Dispatched when Room Variables are updated.
A user receives this notification only from the room(s) where he/she is currently logged in. Also, only the variables that changed are transmitted.
A user receives this notification only from the room(s) where he/she is currently logged in. Also, only the variables that changed are transmitted.
NOTE:
the changedVars array contains the names of the changed variables only, not the actual values. To retrieve them the GetVariable(String) / GetVariables()()() methods can be used.
Version:
SmartFoxServer Basic / Pro
The following example shows how to handle an update in Room Variables.
CopyC#
SFSEvent.onRoomVariablesUpdate += OnRoomVariablesUpdate; public void OnRoomVariablesUpdate(Room room, Hashtable changedVars) { // Iterate on the 'changedVars' Hashtable to check which variables were updated foreach (string v in changedVars.Keys) Trace.WriteLine(v + " room variable was updated; new value is: " + room.getVariable(v)); }