How long does local storage last in non compiled version?

0 favourites
  • 4 posts
From the Asset Store
Basic Plugins for Firebase Authentication, Realtime-Database, Firestore, Cloud Storage
  • Not sure how to make the distinction - when just running a game but not making a proper compilation, how long does local storage last?

    I'm trying to figure if there's a bug in my program where sometimes all the data is gone, or whether construct just erases local storage for temporary runs after awhile?

  • I'm not sure what kind of data you're storing but Localstorage is asynchronous so it's possible that the order of events may be impacting the way things are loading (making them load sometimes and not at others).

    Also, have you changed preview browsers? I believe that local storage stores in each browser separately so that may be why ata appears to be missing.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think I got caught on how construct builds from the last layout you looked at rather than the projects start layout. Thanks for the reply - I'm not sure I have all the bugs out, still occasional discrepancies, so I may have questions in future still!

  • For example, if I set 'profile' key in local storage to equal zero, then I go to the log in screen in the same if statement, it doesn't seem to change the key? It's all happening in an if statement and I made it change a test global to a certain number and that number comes up, so it's doing the if statement...which includes a local storage write, but it's ignoring that?

    Does changing layouts cancel storage writes?

    Edit: My mistake, I had a naming error on my key. Seems to be working now, thanks for the help.

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