The following refers to library functions defined in:
http://playerio.com/documentation/refer ... erio.bigdb
http://playerio.com/documentation/refer ... baseobject
Hi guys its been several days and no substantial reply to my previous post so I'm going to present the information differently.
I am fairly new to database basics -- by looking at multiple examples on this website I am now able to successfully retrieve objects and use their properties in my game (using load()) i.e. I've completed my LogIn screen where it will search for a players name and match their stored password to the one provided.
Using that example I was even able to create a submit button (using createobject) where it will instantiate a new username.key for the table, Password property, and Experience: 0 property.
Now since I'm new to a lot of these functions I did the same thing any person would do: I picked the first one i got to work and flew with it, in this case its _client.bigDB.load("PlayerObjects", profilename, FunctionIfObjectExistsAndSendObjectAsParameter) now this is a great syntax I learned because it allows me to do a magnitude of things, but its limiting factor is its only useful for read-only applications. I now have a list of pending functions that rely on being able to save to the playerio objects database.
<THIS IS WHAT I NEED HELP WITH>
The first and easiest one I want to do is saving experience, just learning this will teach me what I need for the other functions. This will just be a simple retrieve, add 23 experience, and save to databaseobject routine. I've got a clean read-in routine setup:
_client.bigDB.load("PlayerObjects", MrSmith, onSuccess)
public function onSuccess(MrSmithObject) {
trace(MrSmithObject.Experience) //"150"
MrSmithObject.Experience += 23
/*
(Now here's the thing, there's no save on the first link provided, so I'm trying to figure out how to apply the save object method from the second link, "DatabaseObject.save" claims "Save the object to the database.", this isn't located in bigDB, but instead the .DataBaseObject library, and the definition: save(useOptimisticLocks:Boolean = false, fullOverwrite:Boolean = false, callback:Function = null, errorHandler:Function = null):void seems to lack a field to put the physical object into. The following is what i *think* should work??)
*/
dataBaseObject.save(false, false, MrSmith.Experience, null)
//if anyone could provide the correct syntax for what I'm trying to do above I would be most grateful
}