createRoom error

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

User avatar
sean
Posts: 34
Joined: 04 Apr 2006, 11:53

createRoom error

Postby sean » 23 Feb 2007, 03:53

i'm creating a room ("myRoom") from the client side, the room is created with the specified name and i can also join the room automatically, however it displays an error message on my console:

    [ INFO ] > Room Extension [ testExtension ] created!
    [ INFO ] > Room [ myRoom ] created!
    [ WARNING ] > Error during Room creation: [Zone = Lobby] Room
    name already taken. -- User: sean, IP: /127.0.0.1


here's my client side code:

Code: Select all

var gameRoom:Object = new Object
gameRoom.name = "myRoom"
gameRoom.maxUsers = 2
gameRoom.isGame = true
gameRoom.isTemp = true

xt = {}
xt.name = "testExtension"
xt.script = "testExtension.as"
       
gameRoom.extension = xt
       
smartfox.createRoom(gameRoom)


what went wrong?
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 23 Feb 2007, 08:30

Hi Sean.

It seems you are trying to create the room 2 times in a row.
Maybe for some reason you are calling the function that creates the room two times. Please double check your program flow.
Otherwise the problem could reside in the extension. Are you sure it doesn't recreate the same room?
Paolo Bax
The SmartFoxServer Team
User avatar
sean
Posts: 34
Joined: 04 Apr 2006, 11:53

Postby sean » 23 Feb 2007, 10:46

figured it out.. thanks.. hehe

i placed the createRoom on an onJoinRoom event.. and that's where it loops.. hehe.. thanks

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 92 guests