- Home /
Question by
biottik · May 21, 2013 at 01:05 AM ·
javascriptclientintegration
How to acquire an associative array from the client?
Hello! On the client-side i have the following snippet:
var userDetails = {user_name:'Name here',user_id:'ID Here'}; u.getUnity().SendMessage('DataBridge','consumeUserData', userDetails);
And on the "server"-side, i have the following:
function consumeUserData(userData:Hashtable){ Debug.LogError(userData); //Using LogError to be able to see the output on the clientside. }
However, i get an error on the client:
Uncaught Error: Error calling method on NPObject.
How can i make it work, or what is the best way to send a hash from the client to the game? I started with Unity less than a week ago and don't know how to proceed. Thank you.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613102627im_/https://answers.unity.com/themes/thub/images/avi.jpg)