Stars and Tables
JarrenH
Member Posts: 206
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?
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
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
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.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User