How do I do local storage?

Get help using Construct 2

Post » Mon Jul 13, 2015 11:53 am

Hi,

I use the local storage to store my array data, and every thing works fine on the layout where array is, like: array and storage is in layout1's event sheets, and I have another event named layout2, but I find a problem, on layout1, when I close or restart the browser, the data in local storage still there, which is good, but when I have saved data in layout1 and then go to layout2, and close or restart the browser in layout2, the data in array in layout1 can not find, the data is missing? is the proble happened in local storage or array? please help, thanks
B
11
S
3
Posts: 172
Reputation: 1,178

Post » Mon Jul 13, 2015 11:54 am

Is the array global ?
My tutorial through development blog is at http://myconstruct2dev.blogspot.co.uk/
B
12
S
3
Posts: 221
Reputation: 1,328

Post » Mon Jul 13, 2015 12:19 pm

@paulscottrobson yes, it's global
B
11
S
3
Posts: 172
Reputation: 1,178

Post » Mon Jul 13, 2015 12:29 pm

@paulscottrobson i found the problem, there is a clear storage event, thanks also
B
11
S
3
Posts: 172
Reputation: 1,178


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, brunopalermo and 19 guests