hey there… i just emailed Dimerocker support about this, but seeing as it’s Sunday, i might as well post here as well, to see if you guys have got any ideas as to whats going on.
There’s a few places where an object (drUtil.drJSON) is referenced in the DR documentation, and even in the DR API. however, this drJSON object doesn’t visibly exist anywhere that i can see in the code, and certainly not in my drUtil.cs script.
there was a call for it in the drDataStore object. I edited that object so that it didn’t call the command, saved, then undid my change and saved again. now i’m getting an error, telling me that drJSON doesn’t exist! how the hell did it work in the first place!?!?
Can you post how/what you’re saving? That would help determine what is wrong during the loading/decrypting.
Edit:
So, what you get returned is by JSONDecode is a Hashtable, but you’re trying to cast it to a string.
temp = new Hashtable();
temp.Add("username", "Bob");
yield drClient.DataStore.Save(temp);
yield drClient.DataStore.Load();
var loadedJsonData : String = drClient.User.localUser.data;
var loadedData : Hashtable = drJSON.JsonDecode(loadedJsonData);
username = loadedData["username"];
Debug.Log(username);
Is this similar to what’s being done in your code? Are you using a Hashtable? This snippet above gets the decoded Hashtable, and then accesses the “username” field, which prints “Bob” in the debug log.
I’m using the example code straight out of your help file on the Dimerocker site.
I know very little of hashtables but presumably that is the only way to save to the datastore.
I’ll try with your example and see what happens.
Cheers!!