user variable

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

Moderators: Lapo, Bax

samyphp
Posts: 55
Joined: 26 Mar 2008, 05:25
Location: Chennai - India

user variable

Postby samyphp » 31 Dec 2008, 12:00

Hi there,

Can i access user variables in server side...? If yes means how to access user variable..?

i used the following code to access user variable...
var muzzled = userObj.getVariable("muzzled"); // It returns something like it.gotoAndPlay.smartfox.

But i want to get the actual variable i set....What to do..?


Thanks,
Palanisamy
User avatar
cemuzunlar
Posts: 47
Joined: 26 Dec 2008, 00:45
Contact:

Postby cemuzunlar » 31 Dec 2008, 12:48

From the docs:
http://www.smartfoxserver.com/docs/docPages/serverSideApi/index.htm

var = userObj.getVariable(name) will return the variable as a UserVariable object

Then, you should call:

var.getValue();
Cem Uzunlar
Infosfer Game and Visualization Technologies
http://www.infosfer.com
contact@infosfer.com

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 17 guests