addVariable - Addition of a variable to the room
XML request, sent by the client to the server
<protocol>
      <addVariable sid="2">
            <data name="abc" isPrivate="false">27</data>       
      </addVariable>
</protocol> 
                    
Attribute
Meaning
name
Name of the variable we want to add to the room.
isPrivate
Option distinguishing visible and hidden variable.
value
Value of the variable.
Note: Variables can only be added to the rooms where this action is enabled. Such a domain has to have maxVariablesPerUser>0 and maxVariables>0.
XML response of the server to the client
<protocol>
      <response action="addVariable" errorCode="0" [sid="2"]/>
</protocol> 
                    
errorCode
Error description
231
To create new variables is not allowed in the room.
232
The value of maxVariablesPerUser or maxVariables was exceeded.
233
The variable name is not defined.
234
A variable with this name already exists in the room.
235
The message about creation of the variable could not be sent to all clients.
XML message of the server to other clients
<protocol>
      <received action="addVariable" sentFrom="test">
            <data><abc>27</abc></data>
      </received>
</protocol>
                        
Attribute
Meaning
sentFrom
Name of the client founding the variable.
data
In the section data there is name of the new variable and its value.
Note: Other clients logged in the room will only receive the message in case the new variable is public, it means isPrivate=false. If the newly founded variable is not public, other clients will not receive any message.