Data with local storage gets erased after closing app?

Get help using Construct 2

Post » Tue Jul 26, 2016 7:41 am

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
B
5
Posts: 7
Reputation: 239

Post » Tue Jul 26, 2016 9:06 am

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.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
284
S
109
G
91
Posts: 7,317
Reputation: 87,483

Post » Tue Jul 26, 2016 10:59 am

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.
B
5
Posts: 7
Reputation: 239


Return to How do I....?

Who is online

Users browsing this forum: Clark Thy Lord and 1 guest