How long does local storage last in non compiled version?

Get help using Construct 2

Post » Tue Jan 05, 2016 12:39 am

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?
B
52
S
15
G
4
Posts: 191
Reputation: 5,612

Post » Tue Jan 05, 2016 4:18 am

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.
B
71
S
41
G
24
Posts: 356
Reputation: 18,464

Post » Tue Jan 05, 2016 5:26 am

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!
B
52
S
15
G
4
Posts: 191
Reputation: 5,612

Post » Tue Jan 05, 2016 7:01 am

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.
B
52
S
15
G
4
Posts: 191
Reputation: 5,612


Return to How do I....?

Who is online

Users browsing this forum: donstathemonsta and 37 guests