Page 1 of 1
USER_DISCONNECT getPlayerId() returns 0
Posted: 18 Oct 2011, 20:31
by louissi
When a user is disconnected, I want to get the playerId he had at the moment he was disconnected. However, It is always 0. My guess is that since he left the room, he doesn't have a player id anymore. What would be the best way to access this information?

Posted: 19 Oct 2011, 12:58
by louissi
Is there any information I can add that would help you answer?
Posted: 19 Oct 2011, 14:35
by rjgtav
hello. Well, i think that.s the expected behavior, as when an user disconnects, he first leaves all the joined rooms.
Are you using this in a room extension? Also, are you listening for the USER_LEAVE or the USER_DISCONNECT event?
Finally, why do you need to access the playerId when an user disconnects?