Stars and Tables

I'm encountering a very odd bug in my game. And I haven't been able to figure it out, so I'll pose the scenario here.
I have a grid of 24 level icons. As you progress the next level becomes unlocked. Unlocking works just fine, as I use a table to store the true and false of the locked or unlock state. After each level is finished, I record the stars collected and save it into the table as well. When I go back to the level grid, the star number shows up correctly underneath each level icon, and I can go to the main level, switch to a different level, or do practically anything in the app and my values stay in tip top shape. But the dreaded bug comes in when I shut down the app. Upon relaunch everything is correct, right number of levels are unlocked, right number of stars are assigned to each level. Except for one. The very first level on the grid sits glaring at me with 0 stars. I know this isn't a bug with the level icon itself. The actual tabel cell is 0. How can one cell in a table reset, while maintaining the values of the rest?

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2013
    Have you checked to see if that one actor is using instance rules instead of prototype rules? Maybe you unlocked it by mistake...

    You haven't posted any rules or screenshots so it's hard to know what might be causing it. If you prefer to send me a link to download your project file, I can take a look at it for you.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • JarrenHJarrenH Member Posts: 206
    edited March 2013
    Alright, I was in the the process of slimming down the app to send to you (Removing clutter code etc.) Upon testing it to see if it still has the problem... It works! I have no idea what changed, but the value is saved... Thanks for the offer though! Not sure why it works, but now I'll see if I can re-add the rest.

    It's funny how this stuff works. Kind of like explaining a math problem out loud. Just saying it to someone can help you figure it out.
  • JarrenHJarrenH Member Posts: 206
    AHA! Found it. Thats what I get for copying and pasting from one actor to another. I had an actor reset a bunch of attributes on the title screen. Inside that mix was one reseting the first field in the table... It's these simple things that make you facepalm...
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Yay! Sometimes just combing through (as time-consuming as that is) helps you find it. Sometimes you do need another pair of eyes. Glad you got it working.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.