Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

High score not saving.

As_Of_LatteAs_Of_Latte Posts: 343Member, BASIC
edited June 2015 in Working with GS (Mac)

I'm sure I'm missing something obvious, but another set of eyes might help me out with this one :#

Here is how I am saving my high score. I am using a game.HighScore attribute to save to key highscore.

Here is how I am loading my high score. Within a "loading" transition screen in-between scenes, I have the high score loading attribute. I thought this may work, for everytime the user presses retry, the transition screen quickly appears before the scene and updates the high score for each new round.

What I have setup seems to work inside the game. Every new round, the high score is updated. However, when I close out the GS Viewer and reopen, the high score starts back at 0...

How would I go about having the high score stay where the user left off before closing the game?

Hope this makes sense and thank you!


  • frdfrd Posts: 191Member

    I think that every time the viewer opens it acts like it is playing the game for the first time. I could well be wrong, but I think it should be fine once it is published. Anyone, am I wrong?

  • As_Of_LatteAs_Of_Latte Posts: 343Member, BASIC
    edited June 2015

    @frd I thought the same thing as well. But when saving/loading other attributes, such as an in app purchase, then closing/reopening the GS Viewer, my purchased attribute was saved...

    So I'm a little confused as to why my high score att. isn't doing the same :/

  • As_Of_LatteAs_Of_Latte Posts: 343Member, BASIC

    Anyone, get a chance to look at this? Been trying things all day and still can't figure it out...

  • LovejoyLovejoy Posts: 2,078Member

    @As Of Latte said:
    Anyone, get a chance to look at this? Been trying things all day and still can't figure it out...

    Im not sure about the viewer, but does the highscore stay saved when you click on the restart button?(which is equivalent to exiting and reopening the app), if it does then you are good, if not then try redoing the rules again.

    Fortuna Infortuna Forti Una

  • AngryBoiAngryBoi Posts: 586Member

    Are you sure it isn't working? That looks perfect. I just looked into my game and it looks the exact same.

  • As_Of_LatteAs_Of_Latte Posts: 343Member, BASIC

    Thanks for the reply guys.

    @Lovejoy Unfortunately, the score doesn't stay saved when I hit the restart button...

    @tappwaterGames Yeah, I've read over this code hundreds of times and can't find what's wrong.

    But, I'm sure I'll get it! Thanks again.

  • Saridus2012Saridus2012 Posts: 1Member

    I'm having the same issue. If anyone finds a solution let me know! It would be greatly appreciated!

  • tatiangtatiang Posts: 11,907Member, Sous Chef, PRO, Senior Sous-Chef

    @Saridus2012 Have you tested this on an actual device? If you're having "the same issue" be sure to post a screenshot of your rules. It may be that your rules look the same but actually aren't.

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

  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,914Member

    Did you open the expression on the load when entering the key? Be sure just to type it in without opening.

Sign In or Register to comment.