{ Update } SmartFoxServer PRO 1.6.3 available

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

Moderators: Lapo, Bax

saxmaestro
Posts: 4
Joined: 24 Oct 2008, 01:52

thanks

Postby saxmaestro » 28 Oct 2008, 02:59

Thanks, BigFish (and Lapo). I think I have my mind wrapped around the issue and the different workarounds possible... I appreciate the help!

--Jonathan
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 28 Oct 2008, 15:27

You're right. My test was done without recompiling with the previous API.
We have added that check as it seems many people is forgetting about the Room List.

This is one special case in which that check fails...
I would probably change the server side code so that it performs the join from server side without having the client sending that request.

Easier alternative is using the previous API :)
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Postby BigFIsh » 28 Oct 2008, 20:43

I would probably change the server side code so that it performs the join from server side without having the client sending that request.


Good suggestion, cheers.
Smartfox's forum is my daily newspaper.
User avatar
mistermind
Posts: 131
Joined: 15 Sep 2007, 01:33
Contact:

Postby mistermind » 18 Nov 2008, 20:42

I was really exited with all the new features of 1.6.3, but one of the things that stops me from updating my API is the apparent new approach to user.getVariables() that I'm unable to figure out. For some reason when I try invoking getVariables() outside any sfs event it gives me an empty object.
I'm able to get the roomObj and even the userObj, but when it gets to the variables it doesn't work. The weird thing is that I'm actually able to grab the getVariables() just fine when inside an event (onUserEnterRoom or onJoinRoom for example).

What should be happening (as it already works on version 1.6.1) is to be able to save all user's sfsId on an array, then retrieve any user's variables later on by accessing roomObj->UserObj->getVariables.

Example:
When you click on someone in the list of online players on the left, you should be able to see their details such as level, rank and account type on the right. That should be simple enough as shown on the code bellow:

Code: Select all

function viewPlayerDetails(passedID){
roomObj = smartfox.getRoom(_root.mainRoomID);
var viewUser:Object = roomObj.getUser(Number(passedID));
var playerVars:Object = viewUser.getVariables();
playerViewer.viewPlayerName.text = viewUser.getName();
playerViewer.viewPlayerLevel.text = "Level: " + playerVars.level;
playerViewer.viewPlayerRanking.text = "Ranking: " + playerVars.ranking;


On the example above, I can see the username (viewUser.getName()) but I can't get to the variables on 1.6.3.
Is it a bug or did the sinax changed?
SELECT * FROM users WHERE clue > 0
0 rows returned.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 19 Nov 2008, 07:16

I was really exited with all the new features of 1.6.3, but one of the things that stops me from updating my API is the apparent new approach to user.getVariables() that I'm unable to figure out.

There isn't a new approach to the getVariables() method in 1.6.3 and your code should continue to work.

Can you provide us a stripped down example that shows the problem?
Lapo

--

gotoAndPlay()

...addicted to flash games
nig3d
Posts: 164
Joined: 02 Jul 2008, 09:42

Postby nig3d » 17 Jan 2009, 13:23

» UserVariables, new <UserVarsOptimization> config parameter allows to receive only real changes in user variables, avoiding variables that didn't change to be retransmitted

can you tell me what I have to write in the config file to enable this?

» New debugging tags: <DebugIncomingMessages> <DebugOutGoingMessages> allow to debug incoming/outgoing data

can you explain better how can this be used?

thanks
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 19 Jan 2009, 06:34

Check chapter 2.1 of the docs --> http://www.smartfoxserver.com/docs/
There's a list with all the details for each tag

cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
nig3d
Posts: 164
Joined: 02 Jul 2008, 09:42

Postby nig3d » 19 Jan 2009, 07:36

Lapo wrote:Check chapter 2.1 of the docs --> http://www.smartfoxserver.com/docs/
There's a list with all the details for each tag

cheers


there isn't written what to write in the config file
do I have to use just

<UserVarsOptimization>

or

<UserVarsOptimization> true </UserVarsOptimization>

or

something else?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 19 Jan 2009, 07:58

Yes, those are booleans. True/False
By default they are all set to --> False
We'll make it more clear in the docs
Lapo

--

gotoAndPlay()

...addicted to flash games
nig3d
Posts: 164
Joined: 02 Jul 2008, 09:42

Postby nig3d » 19 Jan 2009, 14:04

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

Postby mistermind » 20 Jan 2009, 14:24

Heya guys,
I'm not sure if this was an update from 1.6.3, but there is in deed a lot new parameters available in the config file that are not displayed on the online docs (or any docs for that matter lol)
I was searching for a few (including the one posted above) but there are no records anywhere except some posts on the forum (which in most cases they aren't really tutorials)

<DeadChannelsPolicy> ?
<MaxWriterQueue> ?
<MaxMsgLen> ?

These are just the ones that are already written in the config file examples, and of course, for most of them we can deduct what they mean. Still, it would be nice to have all these parameters explained in the online docs.
SELECT * FROM users WHERE clue > 0

0 rows returned.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 20 Jan 2009, 15:18

Hi,
thanks for reporting.
Actually <DeadChannelsPolicy> is documented in chapter 2.1 (basic config)
We are going to add the other two in there as well.

<MaxWriterQueue> is the maximum amount of messages that can be added to the outgoing message queue. This is unlikely that you will ever change it.

<MaxMsgLen> is the maximum length of an incoming message. By default == 4096 bytes (4Kb).
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
mistermind
Posts: 131
Joined: 15 Sep 2007, 01:33
Contact:

Postby mistermind » 20 Jan 2009, 19:47

Lapo wrote:Hi,
thanks for reporting.
Actually <DeadChannelsPolicy> is documented in chapter 2.1 (basic config)


Oh, then the search inside the docs is not picking up them :D
Tried to search for "DeadChannelsPolicy" and didn't find anything.
Thats why I mentioned that btw
SELECT * FROM users WHERE clue > 0

0 rows returned.
jamieyg3
Posts: 84
Joined: 25 Sep 2008, 16:01

Postby jamieyg3 » 07 Feb 2009, 19:00

Lapo wrote:You're right. My test was done without recompiling with the previous API.
We have added that check as it seems many people is forgetting about the Room List.

This is one special case in which that check fails...
I would probably change the server side code so that it performs the join from server side without having the client sending that request.

Easier alternative is using the previous API :)


I am having this prob after upgrading from 1.6.2 to 1.6.5... is it ever going to change?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 08 Feb 2009, 16:56

Sorry which problem?
Please explain the details.
Also this is not the right thread. This is related to 1.6.3 not 1.6.5

Please delete your last post and start a new topic explaining what the problem is according to the posting rules --> viewtopic.php?t=3307
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 42 guests