I then have a button that runs the following code
Code: Select all
/*******************************************
Tell Users Actions
********************************************/
Map<String, SFSVariable> uVars = new HashMap<String,SFSVariable>();
uVars.put("life", new SFSVariable("200", SFSVariable.TYPE_STRING));
uVars.put("posx", new SFSVariable( "150", SFSVariable.TYPE_NUMBER));
uVars.put("posy", new SFSVariable( "200", SFSVariable.TYPE_NUMBER));
sfsClient.setUserVariables(uVars);
Then I have my event handler
Code: Select all
if(event.getName().equals(SFSEvent.onUserVariablesUpdate))
{
User tuser = (User) event.getParams().get("user");
if(battleAction != null)
{
if(battleAction.equals("attack"))
{
stv.st.get(tuser.getName()).AnimateTo(new Point((stv.width/2)-48, 150));
}
}
}
tuser in this case ends up being null. Any reason for that to happen?
Thanks![/code]