Can't get user variables update message~

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

Post Reply
king3200
Posts: 25
Joined: 28 Oct 2010, 01:48

Can't get user variables update message~

Post by king3200 »

hello~~~here is my server code~~~

Code: Select all

                try {
			dbManager.executeUpdate(sql, sqlPara);
			
			List<UserVariable> variables = new ArrayList<UserVariable>();
			variables.add(new SFSUserVariable(Constans.PLAYER_NICK, newNick));
			getApi().setUserVariables(sender, variables, true, false);
		
		} catch (SQLException e) {
			trace("modify nick error:"+ e.getMessage());
		}
and client code

Code: Select all

sfs.addEventListener(SFSEvent.USER_VARIABLES_UPDATE, onUserVariablesUpdate);

private function onUserVariablesUpdate(e:SFSEvent):void
		{
			trace("user variables update" + (e.params.changedVars as Array));
			trace("user nick:" + user.id);
		}
it's a zone extension, on server side, it works all right, and user's nick update success, but client had never received variables update message~~I do something wrong?
thanks a lot
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Can't get user variables update message~

Post by rjgtav »

Hi.
Are you using the latest server patch (2.1.0) alongisde with the latest AS3 Client API (1.0.3)?
And to the other users in the same room receive the variables update event?
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Post Reply