Data with local storage gets erased after closing app?

0 favourites
  • 3 posts
From the Asset Store
Basic Plugins for Firebase Authentication, Realtime-Database, Firestore, Cloud Storage
  • Hello everyone,

    once again i need your help with a problem that came up.

    for my game i load in data into arrays first. then the user can change some data in the array. because those changes should stay permanent i thought i use local stoarage to save it. and it actually works fine until i close the app and reopen it. then all data gets reset to the original values.

    Is this a problem in my local storage usage or should i actually use a completely diffrent tool to save data between more than one app uses? If thats the case does someone have a demo capx he could show me?

    Big thanks for your answers :3

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The issue might come from either the fact that you aim an iOS device that actually currently has its space drive close to full and do delete the local storage space in order to get more free hard drive space (solution there is to burn all iOS device on the planet so no one use them anymore).

    Otherwise, you do have something going wrong on the execution start of your application where, you are putting default values no matter what.

    Consider posting your code/capx so that people can evaluate what issue may be the correct one.

  • Thank you for your answer.

    I took a good look at my code after your tip and it turns out i had some ordering issuse with when the programm loads from storage and when to save to storage which resulted in me always saving the unaltered data everytime i reopened the app.

    some triggermagic later and everything runs butterysmooth. :3

    again thanks for the nudge in the right direction.

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