customLogin + setUserVariables

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

Moderators: Lapo, Bax

User avatar
kotbegemot
Posts: 82
Joined: 21 Nov 2010, 05:05
Location: Saint-Petersburg

customLogin + setUserVariables

Postby kotbegemot » 10 Dec 2010, 10:18

SmartFox ver 1.6.6

If I use customLogin=true then I try to use setUserVariables = TypeError: Error #1009:

Im use setUserVariables ONLY AFTER JOIN ROOM.
And i use _sfs.myUserId and _sfs.myUserName(I trace it).

If i change customLogin to "false" int WOKRS AGAIN !

This is the code:

var params:Object = new Object();

params.posX = avatar.x;
params.posY = avatar.y;
params.firstTime = false;

trace('MY USER NAME = ' + _sfs.myUserName);
trace('MY USER Id = ' + _sfs.myUserId);

_sfs.setUserVariables(params);

I try also this code from Example

var uVars = new Object()
uVars.myAvatar = "Homer"
uVars.posx = 100
uVars.posy = 200

_sfs.setUserVariables(uVars)

But it not works too.
User avatar
kotbegemot
Posts: 82
Joined: 21 Nov 2010, 05:05
Location: Saint-Petersburg

Postby kotbegemot » 10 Dec 2010, 10:57

I use _sfs.getRoomList();
And i use sfs.myUserId and _sfs.myUserName in extensionhandler, and trace it.
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 10 Dec 2010, 13:41

Wrong forum, you posted un the SFS2X section
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Postby BigFIsh » 10 Dec 2010, 19:20

Are you in a non-limbo room? You can't use setUserVariables via a limbo room.
Smartfox's forum is my daily newspaper.

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 43 guests