LocalStorage keeps reseting to 0 after i reload

Just started using Construct 2? Post your questions here

Post » Thu Jul 02, 2015 10:47 am

As stated in the subject, it keeps resetting to 0

I am not sure if I did something wrong with the event sheets or am I missing out something.
But I'm pretty sure I'm doing it right. Can anybody help me out here?

Image
https://itunes.apple.com/us/app/id1004254105

We bet anyone a hundred dollars if they can reach the bone on the other side of the screen! (Only on the Impossible Mode)
B
10
S
2
Posts: 122
Reputation: 1,004

Post » Thu Jul 02, 2015 1:28 pm

You only update the local storage once, when it gets created, of which I am assuming the data is 0.

so, it is likely not resetting itself ... you never set it.

On event 14, at the bottom, add:

local storage set key "DataString" to DataStorage.AsJSON
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Tue Jul 07, 2015 5:25 am

Thx @lennaert I figured it out, turns out one of my Event Sheet is messing up with the local storage actions.
https://itunes.apple.com/us/app/id1004254105

We bet anyone a hundred dollars if they can reach the bone on the other side of the screen! (Only on the Impossible Mode)
B
10
S
2
Posts: 122
Reputation: 1,004


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests