Problems with Local Storage

Get help using Construct 2

Post » Tue Jun 16, 2015 7:26 pm

Hello,

I'm using Construct 2 to make an app for android and I would like to save some variables, 'Highscore' and 'Coins'. From what I can see, I'm using the 'Local Storage' object correctly in that at the beginning, if the keys don't exist, it creates them etc. When the game is running, on the gameover screen, I have a text object which should display the value of the key 'Highscore' in local storage, however, it either says 'NaN' or the text completely disappears itself! I've been trying to find a work around for days now so I'm at my last resort here. My construct 2 version is r204.2.

Here is my code. Bear in mind that I called coins 'tutorial' and highscore 'serial'. Don't ask why :).

Image

Image

Thanks in advanced!
B
3
Posts: 3
Reputation: 181

Post » Tue Jun 16, 2015 7:39 pm

Image
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Tue Jun 16, 2015 7:55 pm

Sorry if I misunderstood, but what was different in yours to mine?
B
3
Posts: 3
Reputation: 181

Post » Tue Jun 16, 2015 7:56 pm

korbaach wrote:Image

Sorry if I misunderstood, but what was different in yours to mine?
B
3
Posts: 3
Reputation: 181


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 12 guests