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
13
S
4
G
1
Posts: 28
Reputation: 2,438

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
99
Posts: 1,489
Reputation: 55,967

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
13
S
4
G
1
Posts: 28
Reputation: 2,438

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
19
G
179
Posts: 3,477
Reputation: 102,670

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
13
S
4
G
1
Posts: 28
Reputation: 2,438

Post » Wed Feb 03, 2016 2:46 am

ImageImageImage
B
71
S
19
G
179
Posts: 3,477
Reputation: 102,670


Return to How do I....?

Who is online

Users browsing this forum: BobOfAMillion, jhjconstruct, MAVERICK, tarek2 and 10 guests