Saving and loading attributes....think I have found a bug (maybe)
Not sure if this has been mentioned before....but I was just racking my brains as to why a save and load of an attribute in my game was not working. (i.e the attribute was reset when I fully quite the app, and restarted)
I had an attribute called GCstatus. Which I was using to check if a user had gamecenter on/of, or a 3rd choice for the first time the game runs to prompt the user to turn it on or off.
The key I was using to save/load was..... gcstatus
and it didn't work.
After much head scratching and trial and error, I decided to change the key to "gamec".
And now it works.
So I guess you can't have a key which is the same as the attribute name???
I had an attribute called GCstatus. Which I was using to check if a user had gamecenter on/of, or a 3rd choice for the first time the game runs to prompt the user to turn it on or off.
The key I was using to save/load was..... gcstatus
and it didn't work.
After much head scratching and trial and error, I decided to change the key to "gamec".
And now it works.
So I guess you can't have a key which is the same as the attribute name???
Comments
Now when I want to copy a behavior, I drag it into the custom behavior section and drag it back in. That seems to work fine.
- Jeff