Question about onRoomVariablesUpdate

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

User avatar
mistermind
Posts: 131
Joined: 15 Sep 2007, 01:33
Contact:

Question about onRoomVariablesUpdate

Postby mistermind » 27 Sep 2007, 03:32

Hey guys, long time no see :)
Question about onRoomVariablesUpdate on SFS Basic v1.5.5
When I try deleting a room variable by using

Code: Select all

slotList = new Array();
slotList.push({name:_root.gameSlotNumber,val:null});
smartfox.setRoomVariables(slotList,roomID);


Apparently I don't get the event trigger by onRoomVariablesUpdate. Is that normal or am I doing something wrong?
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 27 Sep 2007, 08:13

Usually you don't need to pass the roomId, unless you're connected in multiple rooms.
Is this the case? are you sure that the passed roomId is correct?
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
mistermind
Posts: 131
Joined: 15 Sep 2007, 01:33
Contact:

Postby mistermind » 27 Sep 2007, 14:14

Hey there Lapo :)
Yea I use constants just to make sure Im always using the same id, and in this case I actually use this method only after the trigger onJoinRoom, so in fact there is no need for the room ID. But thats ok its probably something Im doing wrong. Just wanted to make sure that when a variable gets deleted it calls the onRoomVariableUpdate event.
User avatar
mistermind
Posts: 131
Joined: 15 Sep 2007, 01:33
Contact:

Postby mistermind » 27 Sep 2007, 14:53

Humm I did a couple tests here and I think that on SFS Basic 1.5.5 the onRoomVariablesUpdate event do not trigger when you set a variable to null. There is no receiving when you set it to null. just a sending on the XML output, and I also ran some trace tests to make sure, and it didn't trigger at all when you remove it.
When the user leaves the game and he is the var owner it get destroyed and updated, but when you set to null nothing happens.
Im still gonna run a couple more tests here but thats what I've noticed so far.

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 33 guests