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.

C# | Visual Basic | Visual C++ |
public delegate void OnRoomVariablesUpdateDelegate( Room room, Dictionary<string, Object> changedVars )
Public Delegate Sub OnRoomVariablesUpdateDelegate ( _ room As Room, _ changedVars As Dictionary(Of String, Object) _ )
public delegate void OnRoomVariablesUpdateDelegate( Room^ room, Dictionary<String^, Object^>^ changedVars )

- changedVars (Dictionary<(Of <(String, Object>)>))
- a dictionary with the names of the changed variables as keys.

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, Dictionary<string, object> changedVars) { // Iterate on the 'changedVars' Hashtable to check which variables were updated foreach (string v in changedVars.Keys) Debug.WriteLine(v + " room variable was updated; new value is: " + room.getVariable(v)); }