Saving and loading attributes....think I have found a bug (maybe)

SparkyidrSparkyidr Member Posts: 2,033
edited November -1 in Working with GS (Mac)
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???

Comments

  • JeffreyShimaneJeffreyShimane Member Posts: 372
    For the last week, I had been struggling with a setup of Load/Save attributes that worked on my two previous games. I can verify that you can have a key with the exact same name as an attribute. However, what I have found is that using alt/option-drag to make a copy of an existing behavior does not always produce a working behavior. When I recreated the load/save attributes from scratch instead of using alt/option-drag, the load/save setup worked. I even kept the old non-working behaviors and just turned them off (instead of deleting them) so that I could confirm that they were identical (they were).

    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
Sign In or Register to comment.