Looks like something is wrong with the Hashtable being sent back from the server using the c# client api for the OnUserVariablesUpdate event.
Client-side code:
Code: Select all
Hashtable uVars = new Hashtable();
uVars.Add("avatarName", "Homer");
uVars.Add("posx", 100);
uVars.Add("posy", 200);
sfc.SetUserVariables(uVars);
Debug statement (xml being sent):
Code: Select all
Debug - 5/6/2009 3:39:02 PM: [Sending]: <msg t='sys'><body action='setUvars' r='
1'><vars><var n='avatarName' t='s'><![CDATA[Homer]]></var><var n='posy' t='n'><!
[CDATA[200]]></var><var n='posx' t='n'><![CDATA[100]]></var></vars></body></msg>
The xml being sent across appears correct... the types are correct (n and s).
However, on the receiving side (I have another client window open that handles the OnUserVariablesUpdate event) the Hashtable I get back is all bools
Here is a debug statement I have in the event handler:
Code: Select all
foreach (object key in updatedVariables.Keys)
{
sb.AppendFormat("key {0}: value {1} || ", key.ToString(), updatedVariables[key].ToString());
}
Which outputs this:
Code: Select all
UserVariablesUpdate - 5/6/2009 3:39:04 PM: user david_633772211073615456 updated
these variables key avatarName: value True || key posy: value True || key posx:
value True ||
Can you confirm if this is a bug, known issue, or configuration issue (on my server side).
Thanks!