handleRequest() wrong fromRoom ID is received

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

User avatar
Pippoflash
Posts: 135
Joined: 30 Jan 2006, 17:16
Contact:

handleRequest() wrong fromRoom ID is received

Postby Pippoflash » 23 Feb 2006, 00:18

- I join the default room in order to retrieve roomList.
- I create a room from the client, and join it.
- SFS Casts an error "room doesnt exist", but, in reality, it does join it (as seen on the admin panel).
- On the panel, it shows me logged in the newly created room.
- I send some messages to a zone level extension, and it receives it in handleRequest() "fromRoom" with the ID of the default room!!!
- If then I log other users to the same newly created room, the extension receives the correct room ID.

Questions:
- How can I make sure that the room is created before joining it?
- SFS doesnt cast any error on room creation, but then when I join it it says that room doesnt exist! (but it makes me join it anyway)
- Is there a callback from room creation, so that I can be sure?
- Should I twek it with an interval to give ti the time to create it?

thanks
Filippo
-----------------------
www.pippoflash.com
-----------------------
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 23 Feb 2006, 07:05

don't you wait for the onRoomAdded event?
This is fired when a new room is created. So your code shuould follow this pattern:

- join the default room
- create the new room
- handle the onRoomAdded event
- check that the new added room is the one you were expecting
- join it

hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 23 Feb 2006, 07:07

SFS doesnt cast any error on room creation


It fires a onCreateRoomError event if something goes wrong, sending the details of the error
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
Pippoflash
Posts: 135
Joined: 30 Jan 2006, 17:16
Contact:

Postby Pippoflash » 23 Feb 2006, 10:34

I found the problem :)
thank you
-----------------------

www.pippoflash.com

-----------------------

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 16 guests