[HELP] preserve the room variable even if the owner leave

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Locked
kaloy12
Posts: 26
Joined: 20 Nov 2010, 23:39
Location: PH

[HELP] preserve the room variable even if the owner leave

Post by kaloy12 »

HI there,

Is there a way to preserve a room variable even if the owner leaves it?

here is my scenario.

Player1 sets a roomvariable isStarted=true

if the roomvariable isStarted==true;
it should not display on the roomlist.

it works fine if Player1 is still on the room.
the problem is if player1 quits the game the isStarted variable becomes undefined or sometimes null.


i hope someone can hell me on this.


note:
the use of this code is to prevent other player on the zone not to join on the game if it is started.


it is something like in dota that if the game is started, it will br remove on to the list of the roomdisplay,

is there a better way to do this stuff?
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Post by rjgtav »

Hi. Please do NOT double post...

Answered in your other topic at:

http://forums.smartfoxserver.com/viewtopic.php?t=11850
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Locked