Forum ‹ BigDB ‹ Problem saving playerObject
4 posts
• Page 1 of 1
Problem saving playerObject
I'm just trying out to as simply as possible load a playerObject after I've connected with facebook (in handleConnect(client:Client)), input a var and then save it but i get the error: TypeError: Error #1006: Save is not a function.
Here's what I do:
client.bigDB.loadMyPlayerObject(function(obj:DatabaseObject):void{
obj.experience = 0;
obj.Save();
});
If i trace obj i get the following:
[playerio.DatabaseObject]
PlayerObjects["fb714236859"] = {
} (Version:1)
So loading seems to work.
Any ideas what I've done wrong?
Here's what I do:
client.bigDB.loadMyPlayerObject(function(obj:DatabaseObject):void{
obj.experience = 0;
obj.Save();
});
If i trace obj i get the following:
[playerio.DatabaseObject]
PlayerObjects["fb714236859"] = {
} (Version:1)
So loading seems to work.
Any ideas what I've done wrong?
- Drutten
- Posts: 9
- Joined: August 9th, 2010, 7:47 am
Re: Problem saving playerObject
The method name is save(), not Save(). Case matters.
- SeriousWorm
- Posts: 9
- Joined: August 5th, 2010, 1:02 pm
Re: Problem saving playerObject
That's it! Thanks a bunch! I didn't bother looking that up since all examples (i've looked at) here said Save().
If anyone would like to correct that this is the page i'm referring to: http://playerio.com/documentation/bigdb/playerobject
Also this one says it's Save(): http://playerio.com/documentation/bigdb/example
If anyone would like to correct that this is the page i'm referring to: http://playerio.com/documentation/bigdb/playerobject
Also this one says it's Save(): http://playerio.com/documentation/bigdb/example
- Drutten
- Posts: 9
- Joined: August 9th, 2010, 7:47 am
Re: Problem saving playerObject
Hey Drutten,
Good catch! We've fixed the casing in the docs for next release.
- Oliver
Good catch! We've fixed the casing in the docs for next release.
- Oliver
-

Oliver - .IO
- Posts: 1136
- Joined: January 12th, 2010, 8:29 am
4 posts
• Page 1 of 1