Okay so im coding houses for my game and I have a problem,
How do I check if a room already exists?
[HELP] Room Creation
-
reecedogcp78
- Posts: 71
- Joined: 12 Dec 2010, 18:16
[HELP] Room Creation
~Reecedog,
Experienced blogger with 100 thousand hits gathered.
New to SFS But also very good with it
Experienced blogger with 100 thousand hits gathered.
New to SFS But also very good with it
Hi. You can check it in the client-side or in the server-side:
[Client-Side]
You can get a room by its id (http://www.smartfoxserver.com/docs/docP ... ml#getRoom), or you can loop through all the rooms inside the roomList and check its names.
[Server-Side]
You can get a room by its name (or by its id), in the Zone class:
http://www.smartfoxserver.com/docs/docP ... s/Zone.htm
Then, if it returns null, its because the room doesn't exist, if not, the room exists.
[Client-Side]
You can get a room by its id (http://www.smartfoxserver.com/docs/docP ... ml#getRoom), or you can loop through all the rooms inside the roomList and check its names.
[Server-Side]
You can get a room by its name (or by its id), in the Zone class:
http://www.smartfoxserver.com/docs/docP ... s/Zone.htm
Then, if it returns null, its because the room doesn't exist, if not, the room exists.
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.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.