I have a custom login and I assign a id # to myUserId in the extension response handler. After joining a room and checking the userlist I find that the user ids from the room userlist do not match the id's Ive assigned. Rechecking myUserId verifys that my id is still correct just not in the room user list. Because of this I get errors when trying to use setUserVariables and receiving updates on other users.
Is there something I haven't set properly to allow the userlist to have an accurate user id?
user id problem
Re: user id problem
Apparently, no help here. Did I miss something in the docs? Anyone?
-
- Posts: 204
- Joined: 22 Sep 2013, 23:33
Re: user id problem
Rutter wrote:I have a custom login and I assign a id # to myUserId in the extension response handler. After joining a room and checking the userlist I find that the user ids from the room userlist do not match the id's Ive assigned. Rechecking myUserId verifys that my id is still correct just not in the room user list. Because of this I get errors when trying to use setUserVariables and receiving updates on other users.
Is there something I haven't set properly to allow the userlist to have an accurate user id?
I'm having the same problem unfortunately i can't really help but your not alone.
- zachofthegolden1
- Posts: 89
- Joined: 05 Sep 2011, 19:31
Re: user id problem
Rutter wrote:I have a custom login and I assign a id # to myUserId in the extension response handler. After joining a room and checking the userlist I find that the user ids from the room userlist do not match the id's Ive assigned. Rechecking myUserId verifys that my id is still correct just not in the room user list. Because of this I get errors when trying to use setUserVariables and receiving updates on other users.
Is there something I haven't set properly to allow the userlist to have an accurate user id?
The smartfoxserver will always use diffrent id's for logins. The best way to have their username as the id and a seperate way of displaying their name.
On my extensions i set the login to update the datebase to a field named temp_id everytime i login. then if there is an extension needing ot refur to a user it can read the temp id there given for that session and read their real database id along with anything else thats needed.
When i did that i was able ot have a field named "name" so the username is their database ID and their name is changeable but this can be very complicated with diffrent games and code. My game logs in using facebook so the id thing is good to use. for typing there might be an issue. If i had soem idea on how it works for your game i might be able to come up with something.
-ZG1
Return to “SmartFoxServer 1.x Discussions and Help”
Who is online
Users browsing this forum: No registered users and 56 guests