How can I save Array In local computer storage?

Get help using Construct 2

Post » Sun Jan 31, 2016 7:39 pm

I need to save array data in local device memory, so I can close App and download array data after opening it again! Please write some detalized or better give me CAPX. Thanks! (Sorry for bad ENG)
B
15
S
5
G
1
Posts: 31
Reputation: 2,594

Post » Sun Jan 31, 2016 11:25 pm

Use "Array.AsJSON" expression to save the array data to Local Storage plugin, then use the array's "Load" action to load it.

https://www.scirra.com/manual/188/local-storage
https://www.scirra.com/manual/108/array

You can also use the array "Download" action to get the array data as a file that you can manipulate offline, and load again when needed with the "Load" action.
Mistakes were made.
B
47
S
23
G
107
Posts: 1,574
Reputation: 60,139

Post » Tue Feb 02, 2016 3:59 pm

Hmm there is something wrong with this method. Array save local storage data in first X and this looking just like this->{"c2array":true,"size":[10,1,1],"data":[[[7]],[[6]],[[7]],[[3]],[[7]],[[0]],[[7]],[[0]],[[6]],[[0]]]}
Maybe you can give me CAPX for better understending, please?
B
15
S
5
G
1
Posts: 31
Reputation: 2,594

Post » Tue Feb 02, 2016 4:39 pm

That's what you get. If you load it again you will see the data is the same as when you set it.
ImageImageImage
B
71
S
21
G
211
Posts: 3,614
Reputation: 119,147

Post » Tue Feb 02, 2016 8:34 pm

blackhornet wrote:That's what you get. If you load it again you will see the data is the same as when you set it.

Please give me CAPX someone! I dont understand all of you talking about... -__-
B
15
S
5
G
1
Posts: 31
Reputation: 2,594

Post » Wed Feb 03, 2016 2:46 am

ImageImageImage
B
71
S
21
G
211
Posts: 3,614
Reputation: 119,147


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests