new SFSRoomVariable(name, value [, type])
Creates a new SFSRoomVariable instance.
Although the third parameter is optional, it is strongly recommended to use it. The reason is type autodetection of numbers (being integers or double precision numbers)
may fail in some corner cases (for example n1 = Math.floor(100.0 - 99.0)
will be treated as a double instead of an integer as expected).
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
name |
string | The name of the Room Variable. | ||
value |
boolean | number | string | SFSObject | SFSArray | The value of the Room Variable; it can also be null . |
||
type |
VariableType |
<optional> |
null | The type of the Room Variable's value, among those listed in the VariableType enum; if null , type is autodetected. |