Need help with local storage - NAN

0 favourites
  • 4 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hi!

    I've got this bug over and over again... The local storage empty itself.

    Have you any idea why?

    Any idea would be helpful, I'm stuck with this from over a year now :(

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is what I did in my games:

    - On start layout-> LocalStorage check "bestScore" exist.

    - If item exist-> set bestScore to LocalStorage.ItemValue (no need to get it)

    - If missing-> set bestScore to 0

    You only need to check the gameScore>bestScore is enough.

    Then set bestScore to gameScore.

    And set key to gameScore.

  • I will try this out!

    Since this bug is more or less random, hopefully in few days this bug will not apears anymore...

    Thanks for the reply!

  • In between this test I wanted to make, I crossed the Rable path during an event here in Belgium, aaaaand we figured out the problem!

    In my game flow, when the player lose, he quickly can restart the game, but I did not break the flow for the local storage to be properly saved. That's where the bug come from.

    Thanks everybody!

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