ServerSide: javascript
I create a RoomVariable "X" with code:
var x=new SFSRoomVariable("X",valuestring);
x.setGlobal(false);
Arrays=[x];
getApi().setRoomVariables(null, room, Arrays,false,false,false,true);
..and all is Ok it appear on Room variables in Admin Panel
now how can i call it from serverside, when i need later?
T's
Server Variable
Re: Server Variable
Hi,
from the Zone object you can get the Room ( getRoomById() or getRoomByName() )
With the Room you can get the variable via getRoomVariable(name)
In other words:
Cheers
from the Zone object you can get the Room ( getRoomById() or getRoomByName() )
With the Room you can get the variable via getRoomVariable(name)
In other words:
Code: Select all
var room = getParentZone().getRoomByName("myRoom");
var roomVar = room.getVariable("varName");
Cheers
Who is online
Users browsing this forum: Bing [Bot] and 146 guests