How do I show the last High Score?

Get help using Construct 2

Post » Fri Aug 25, 2017 12:10 pm

I have followed some example and capx files for the Local storage tutorial, so it is working when browser is open.
But when I reopened the browser the last High score not shown on screen.

Any help will appreciate!

Thanks in advance
B
41
S
9
G
1
Posts: 79
Reputation: 2,747

Post » Fri Aug 25, 2017 12:56 pm

What do you mean when you say it is working when browser is open? Doesn't sound like localstorage has worked at all here and you will need to double check your logic from the tutorial.
B
53
S
21
G
94
Posts: 2,425
Reputation: 55,563

Post » Fri Aug 25, 2017 2:24 pm

Are you sure you are saving and loading the data correctly?
My first project:
Image
B
20
S
8
G
1
Posts: 172
Reputation: 2,463

Post » Fri Aug 25, 2017 3:28 pm

I have tried this type of event.
please click on the following link.

https://www.dropbox.com/s/6umb85plcxrkhdt/IMG.jpg?dl=0
B
41
S
9
G
1
Posts: 79
Reputation: 2,747

Post » Fri Aug 25, 2017 3:52 pm

LocalStorage is a little buggy and sometimes it won't load all data.

Read this thread: localstorage-does-not-save-data-on-phone_t193186?start=10

I am using the method of saving anything into a dictionary and then saving the dictionary as one item in the LocalStorage
My first project:
Image
B
20
S
8
G
1
Posts: 172
Reputation: 2,463

Post » Fri Aug 25, 2017 6:54 pm

@ RobertMKD,

Thanks! can you please tell me how to write event.
B
41
S
9
G
1
Posts: 79
Reputation: 2,747

Post » Sat Aug 26, 2017 3:46 am

@ RobertMKD,
and
@ plinkie,

The problem is solved, I have missed there one step.
"Local storage" -"get item"

Thanks for the comments ! :)
B
41
S
9
G
1
Posts: 79
Reputation: 2,747


Return to How do I....?

Who is online

Users browsing this forum: Kyatric, Metathronos, sinoscuras and 8 guests