Update room variables from web client

Post here your questions about the Java client / Android API for SFS2X

Moderators: Lapo, Bax

freeandoni
Posts: 14
Joined: 28 Feb 2012, 19:02

Update room variables from web client

Postby freeandoni » 14 Mar 2012, 16:37

Hello,

I'm trying to update the room variables by smart fox server web client.

I have a private and global room variable called MOVE_TIME and I change it to different numbers.

On java server extensions, on handleClientRequest, I have this code:

Code: Select all

Room room = user.getLastJoinedRoom();
room.getVariable("MOVE_TIME").getIntValue()


When I change the room variable the java server extension don't update the change until I reboot the SmartFoxServer.

How should I do this?
itsmylifesoham
Posts: 186
Joined: 16 Oct 2011, 14:33

Re: Update room variables from web client

Postby itsmylifesoham » 15 Mar 2012, 05:31

hi,

i think what you are doing is while your application is running you are modifying the value for MOVE_TIME (some room variable) and want to to take effect on the fly? am i right?

i hope you are not going into the zone configurator , then going in your room configuration and setting the room variables there.
any changes done in the zone configurator to a running application will require a reboot for those changes to take effect.

for on the fly MOVE_TIME change
1. just go to your "ZONE MONITOR". click on the room you want to modify the room variable for.
2. click monitor selection.
3. there is a tab "runtime room variables"
4. edit it there and it should take effect without a reboot.
freeandoni
Posts: 14
Joined: 28 Feb 2012, 19:02

Re: Update room variables from web client

Postby freeandoni » 16 Mar 2012, 07:30

I get there and I click on 'Enter edit mode' button. Then I try to edit room vars but there is no way.

I have check all the params looking for a solution but I have not found.
itsmylifesoham
Posts: 186
Joined: 16 Oct 2011, 14:33

Re: Update room variables from web client

Postby itsmylifesoham » 16 Mar 2012, 10:52

hi,

in the list of room variables can you see the MOVE_TIME roomvariable that you want to change? is it not editable?
thats weird.

you mentioned that its a private room variable, if some other user is setting this then it seems that a private variable can only be modified by its owner(person who set the variable basically).

Return to “SFS2X Java / Android API”

Who is online

Users browsing this forum: No registered users and 14 guests