Create a room forever...

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

Moderators: Lapo, Bax

Post Reply
Portuguese
Posts: 12
Joined: 07 Apr 2006, 23:43

Create a room forever...

Post by Portuguese »

How can i create a room that stays forever in the server?

Sorry for mi english :oops:
goodguy20k
Posts: 71
Joined: 10 Jan 2006, 23:58
Location: Texas, USA
Contact:

Post by goodguy20k »

Welcome to the forum. :)

What version of SmartFox are you running and what edition (Lite, Basic, Pro)?

The answer is yes and no. When you let me know what you have, I'll be able to share my knowlege. Otherwise, hold on the line and Lapo will be with you shortly, I'm sure. 8)
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

All the rooms specified in the config.xml file will exist forever.
You can define your own by simply adding new ones in the config file and restarting the server.

For more details about all the room properties make sure to read our online documentation > http://www.smartfoxserver.com/docs/
Lapo
--
gotoAndPlay()
...addicted to flash games
Portuguese
Posts: 12
Joined: 07 Apr 2006, 23:43

Im using the PRO one, the 1.4..

Post by Portuguese »

Im using the PRO one, the 1.4 version, and the 20 users free license, yeah i know that i can create them at the config.xml but I one make that a visitant creates his own Room by the .SWF file and stays for ever in the server also if the user disconnect from the server.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

To do so, you need to create a room from a server side extension, passing a null user/owner.
By doing so the room owner is the Server itself and the room will never be destroyed.

You should check the documentation of the _server.createRoom() method, which allows dynamic room creation

hope it helps

:)
Lapo
--
gotoAndPlay()
...addicted to flash games
Portuguese
Posts: 12
Joined: 07 Apr 2006, 23:43

thanks i will try it

Post by Portuguese »

thanks i will try it but i don't need to add an Extension right?
Virusescu
Posts: 260
Joined: 07 Sep 2005, 09:36
Location: [RO]Bucharest
Contact:

Post by Virusescu »

Wrong. You will need to add an extension. That function is form the SFS extension framework.
Don't worry. It's really easy to add one ;).
function onJoin(usr) {if (usr.getName() == "Lapo") trace ("All Hail Lapo");}
Portuguese
Posts: 12
Joined: 07 Apr 2006, 23:43

how can i add one?

Post by Portuguese »

how can i add that extension and how can i make that extension that i need and wich one do i need?

sorry for the questions but i am new here :oops:
Virusescu
Posts: 260
Joined: 07 Sep 2005, 09:36
Location: [RO]Bucharest
Contact:

Post by Virusescu »

Read chapter 6.1 from the documentation - http://www.smartfoxserver.com/docs/

and 6.2
function onJoin(usr) {if (usr.getName() == "Lapo") trace ("All Hail Lapo");}
Portuguese
Posts: 12
Joined: 07 Apr 2006, 23:43

is there any example?

Post by Portuguese »

is there any example of the extension i need? i have read the DOCs and i didn't understand at all, i just want to create a room that when somebody creates a room the room get owned by the Server so it will never destroy..
Post Reply