Hi admin,I read about the event USER_ENTER_ROOM at http://docs2x.smartfoxserver.com/api-docs/jsdoc/symbols/SFS2X.SFSEvent.html#.USER_ENTER_ROOMI want to that when an user enter room, I can get more information such as level, money...from the user. I think so we can use method user.setVariable(). But where do we can set the variables? How to implement that?I try to implementing code in server. But when the event USER_ENTER_ROOM is fired, I cannot get the variables.

Hi,you have linked a page from the Javascript documentation, but you have posted under Java/Android. What is your development platform?

The USER_ENTER_ROOM event on client side fires every time a user joins the same Room where the player is now joined. Once you receive the event you're passed the User object and you can definitely access all of the UserVariables, if you have set them.

In your server side code you're calling sender.setVariable(...) which works only locally on the server side without sending any updates to other clients.

We always recommend using the main SFSApi object instead which you can access in your Extension code by calling getApi()Like this: