JoinRoom Event Not fired

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Post Reply
ktamlyn
Posts: 17
Joined: 04 Sep 2013, 16:25

JoinRoom Event Not fired

Post by ktamlyn »

I am creating a room, then joining it immediately. Sometimes when a user enters the room, a JOIN_ROOM event is fired, other times it is not. It is never fired by the creator of the room entering the room.

I need to respond to users entering the room to initialize data. The room in question is dynamically generated, and the user is automatically joined to it. I am guessing that for some reason the JoinRoom event is not firing for a specific reason in this scenario.

Any thoughts?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: JoinRoom Event Not fired

Post by Lapo »

Sometimes when a user enters the room, a JOIN_ROOM event is fired, other times it is not. It is never fired by the creator of the room entering the room.
ROOM_JOIN is fired exclusively to the user that has joined the Room.
All other clients in that Room will receive a USER_ENTER_ROOM.
I need to respond to users entering the room to initialize data. The room in question is dynamically generated, and the user is automatically joined to it. I am guessing that for some reason the JoinRoom event is not firing for a specific reason in this scenario.
The event is always fired, there are no exception unless a join error is raised. In that case you should see the details in the server logs and you should make sure to also listen to the ROOM_JOIN_ERROR to trap them on the client side.
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply