Question about Room and Zone Extention variables

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

Moderators: Lapo, Bax

xMoMx
Posts: 36
Joined: 13 Jun 2009, 06:11

Question about Room and Zone Extention variables

Postby xMoMx » 22 Jun 2009, 00:59

I'm getting confused about Zone and Room variables.

if I declare a variables at the Zone extention and update it from one of the room, does it get update for all the rooms inside the same zone? (In other word, do all the rooms share the same variables from zone Extention?)

And what about variable from Room Extention?
xMoMx
Posts: 36
Joined: 13 Jun 2009, 06:11

Postby xMoMx » 23 Jun 2009, 11:06

I'm so confused... not getting any of this from reading all the provided documents. I kinda draw conclusion from the examples and here's what I get ->

1. Any variables declaring from Zone and Room Extensions are created anew everytime a new room is created, not when the server started.

2. Only those declared as RoomVariables send update respense to users.

3. Zone and Room can only send variables to each other with handleInternalRequest. This add to CPU loaded and should it be avoid when possible.

4. Init are called once, when the server started.

Is this right? :oops:
xMoMx
Posts: 36
Joined: 13 Jun 2009, 06:11

Postby xMoMx » 24 Jun 2009, 00:52

Answering my own Q.

1. No. Variables inside Zone extension are created once, and can only be changed with its own internal logic. Same thing with variables that are declared inside room extension (and not defined as 'room variables') are created once upon the script initialized, not when room are created.

Only 'room variables' are created anew once a room is newly created.

Am I getting close?

Question is, how do I create Room internal variables that do not send update to the clients?

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 42 guests