Multi-Room feature does not exit users correctly

You think you've found a bug? Please report it here.

Moderators: Lapo, Bax

Post Reply
duncanhall
Posts: 29
Joined: 04 May 2008, 14:52
Contact:

Multi-Room feature does not exit users correctly

Post by duncanhall »

SFS 1.6.2
AS2 API 1.5.4

- Join a static room
- Join a game room while still remaining in the original static room
- All users leave game room and it is deleted
- Expecetd behaviour is that the user should now simply be in the first, static room. However, at this point, the user seems to still be considered to be in the room that was deleted. Viewing the debug info here, I can see that sending a public message results in the message trying to be sent with a room ID of the room that was deleted.

100% reproduction rate.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Thanks for reporting. I am also adding here the link with the full description of the issue -> http://forums.smartfoxserver.com/viewtopic.php?t=3382
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Discussion:
this is not actually a bug. As per the documentation we specify that if you use multiple rooms you should keep track of the joined room ids manually.

This is one of those cases. After you have left the 2nd room (room Y) you should manually set the sfs.activeRoomId to the ID of the new "current" room.

The activeRoomId is the default ID used for every request when you do not specify an alternative ID (for example for sending pub/priv messages, setting variables etc...)

Hope it helps

p.s. = we'll add this example to our docs to better explain the manual ID handling
Lapo
--
gotoAndPlay()
...addicted to flash games
duncanhall
Posts: 29
Joined: 04 May 2008, 14:52
Contact:

Post by duncanhall »

Thanks Lapo, I think I was getting closer to the problem but this has nailed it on the head.

I hadn't realised the activeRoomID was a property that could be set as well as read. Is there any preference for setting the activeRoomID rather than just specifying the targeted roomID for each message sent?
Post Reply