Help with localstorage score saving on clicker

What Wick Editor Version are you using?
1.19.3
Describe the Problem
I’m trying to make a clicker engine with persistent score-saving across sessions, but when i flip it on it just adds a 1 to the end
Persistent off: 5+1=6
Persistent on: 5+1=51 then 51+1=511

What have you tried so far?
Tweaking values and code

Do you have a Wick Editor File that we can see? Optional*
Clicker Engine v1.06-11-2021_18-13-42.wick (273.0 KB)

Clicker Engine v1.06-11-2021_15-41-53.wick (273.0 KB)

here you go. I think when you get the number back it became a string, so I used parseInt() to make it an integer, then I checked if the score was NaN (by using isNan()) instead of checking if it was null.

Thank you so much, but for some reason it doesn’t load the value and it stays as 0 when i pause the project and restart it

that’s because you have to pause first, then make sure it’s on cross-session.

I did, but it still doesn’t
Maybe it’s the same issue as before

i think you have to constantly initiate cross-session. if you stop and start twice it resets, but not the first time. the localstorage kicks in only when you pause the game. for a frame you can see it say “session only” before instantly going back to “cross-session”. so you have to use the localstorage somewhere ingame to determine if it’s session only or cross-session.

Ohhhhhhhhhhhhhhh
That makes sense now that i think about it
aand i cant get it to work, it just resets to 1
can you send a wick file

what resets? the score?

Yes, the score