how to access room name

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
itsmylifesoham
Posts: 186
Joined: 16 Oct 2011, 14:33

how to access room name

Post by itsmylifesoham »

hi,

i am handling the roomjoinerror event, but need to show a different error message for a specific roomname, how can i achieve this? as the roomjoinerror event does not give access to the roomname.

thanks.
Damace
Posts: 58
Joined: 04 Jul 2011, 16:45

Post by Damace »

You can store the reference to the room that the user is trying to join in a variable on the client side. Then when an error occurs you can tell what room the user was trying to join.

There are only so many reasons for the ROOM_JOIN_ERROR to occur:
There are a number of possible things that could invalidate the attempt to join a Room.

Room is full: each Room has a certain capacity. If the maximum number of users is reached no more clients will be able to join until a few slots are made available.
Room doesn't exist: the Room id provided in the join request is not valid. No Room was found with that name or Room id (a unique Room number which can be used in alternative to the name).
Wrong password: Rooms can be made private via the use of a password. If you don't know this password or you have forgotten it, you won't be able to access the Room.
Can you provide more details about your situation?
itsmylifesoham
Posts: 186
Joined: 16 Oct 2011, 14:33

Post by itsmylifesoham »

done, thanks :)
Post Reply