setUserVariables()
Availability:
SmartFoxServer Lite / Basic / Pro
Usage:
smartFox.setUserVariables(varObj <propList>, roomId <integer>)
Description:
Stores data on the server side. When you set/update/delete one or more User Variables all the other users in the room will be notified. User variables are usefull to store user profile data that can be shared across other users.
Parameters:
varObj | a propertylist containing the variables to save | |
roomId | (optional) the id of the source room, if you are allowing users to join multiple rooms |
Returns:
Fires the onUserVariablesUpdate event
Example:
Example #1
in an avatar chat you could save the user profile (avatar name and position)
like this:
uVars = [#myAvatar: "Homer", #posx: 100, #posy: 200] smartFox.setUserVariables(uVars)
See also:
onUserVariablesUpdate