How do I get the Global Highscore to store correctly?

  • Hello!

    I am working with the runner template to learn Construct and I wanted to put in a High Score system. I watched the video ArcadEd did and I adjusted the Storage local information, ie: (Storage.LocalValue("Highscore")), I saw other people had commented on but I still can't get the Highscore to post to the game screen or the game over screen. I keep getting the "NaN" error, I consulted other posts about this problem but they answered with the same solutions.

    Here is a screenshot of my main layout perhaps the problem lies in my construction:

    Thank you in advance for your time.

  • i think if you remove the second condition on event 18 and remove event 19, it should be ok

    or

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • In event 2 use "Set Highscore" to int(Storage.LocalValue("Highscore"))

    NAN is "Not A Number" if you just use (Storage.LocalValue("Highscore")) you are getting the value as a "string" and not an "integer" .

  • Thanks Trulz & Minor! That took care of the NaN. Appreciate it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)