Bug joining room when logged - onRoomJoined not fired

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

Moderators: Lapo, Bax

Post Reply
Pippoflash
Posts: 135
Joined: 30 Jan 2006, 17:16
Contact:

Bug joining room when logged - onRoomJoined not fired

Post by Pippoflash »

Here is the scenario:

1 - at a certain time, a tournament room is created.
2 - users subscribed to tournament are prompted to go
3 - if they click yes they go to the tournament lobby

simple flow...
Now, if I log in after the tournament already exists, I am prompted and I successfully join the tournament room.

If this happens when I am already logged in, I click yes on the prompt, and I am inserted into the tournament lobby, BUT on the client the onRoomJoined is NOT FIRED! I have set a delay after room creation, anything, but still if I was already logged, I do log into the room, but the client doesn't receive the update!

Is this something common?
any help?

thanks
Filippo
-----------------------
www.pippoflash.com
-----------------------
Pippoflash
Posts: 135
Joined: 30 Jan 2006, 17:16
Contact:

Post by Pippoflash »

Furthermore,
setting a timed event to check the room I am in,
on the admin tool, I am on the tournament lobby, but on the client, no matter what, I remain in the same room where I was before, even though on server everything is ok...
-----------------------
www.pippoflash.com
-----------------------
Pippoflash
Posts: 135
Joined: 30 Jan 2006, 17:16
Contact:

Post by Pippoflash »

Here is the reason:
if on createRoom, the sendUpdate is set to false, then clients which are already connected are UNABLE to join the room.

This doesn't make much sense...
Why should I want notify all clients in zone of a new room if its just one client I want to connect to that room?

Is there a way to force notification of room creation to only ONE client?

thank you
-----------------------
www.pippoflash.com
-----------------------
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Post by BigFIsh »

Clients will need to know about the 'new' room locally in order to join it. It won't make sense for a client to join a room locally and not knowing its id, name, maxPlayers, and so on.
Is there a way to force notification of room creation to only ONE client?
Yes, this is possible. You'll need to use the sendGenericMessage method.

Basically, you'll need to capture the incoming 'newRoom' xml message (by enabling debug for sfs) and use it's format to generate a duplicate copy of the 'newRoom' xml message from serverside and send it to that particular user using the sendGenericMessage method.
Smartfox's forum is my daily newspaper.
Pippoflash
Posts: 135
Joined: 30 Jan 2006, 17:16
Contact:

Post by Pippoflash »

Thank you very much BigFish, you are always very helpful.

I have to say that in the documentation a note saying "if you set this flag to false, clients will not be able to log into room" would have spared me 6 hours of bug hunting :)

Would be a great idea if smartfox team turns documentation into a wiki.
-----------------------
www.pippoflash.com
-----------------------
Post Reply