Get user ID onVariableUpdate

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

ProgramBoy
Posts: 30
Joined: 25 Aug 2016, 02:52

Get user ID onVariableUpdate

Postby ProgramBoy » 09 Oct 2016, 14:13

Hi,

I'd like to detect which users ID is running a variable update.
For example:

Code: Select all

<msg t='sys'><body action='userVariableUpdate' r='1'><vars><var n='sendThing' t='s'><![CDATA[444]]></var></vars><user id='1' /></body></msg>


So 'sendThing' is set to 444, when this happens I'd like to trace the users ID.

Thanks
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Get user ID onVariableUpdate

Postby Lapo » 11 Oct 2016, 07:11

Hi,
when you receive an onUserVariableUpdate event on the client side, you are provided the user object relative to the client who sent the variables.
See here:
http://smartfoxserver.com/docs/1x/docPa ... index.html
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 20 guests