How do I ARRAY LOAD / DOWNLOAD

Get help using Construct 2

Post » Thu Apr 10, 2014 2:32 am

HI,

This is my easy code to save, clear, and load again the array,
but dont work, what is the problem??

Tks
Rgs


SET ARRAY
Array Set Value at (0,0,0) to "Paris"
Text set text to array.at (0,0,0)

SAVE
BT_SAVE on clicked Array Download as JSON with filename "Data.json"

CLEAR
Array Set Value at (0,0,0) to ""
Text set text to array.at (0,0,0)

LOAD
BT_LOAD on clicked Array Load from JSON string "Data.json"
Text set text to array.at (0,0,0)
B
6
S
1
Posts: 47
Reputation: 518

Post » Mon Apr 21, 2014 6:55 am

The problem is that the Load Action for the Array Plugin doesn't load from a previous JSON file that you saved. It loads from a string as stated in the dialog for the Action unfortunately. If you want to load a JSON files contents at runtime, you'll need the AJAX Plugin. Look for this tutorial on the Scirra site for how to do this: AJAX Example with Construct 2.
B
9
S
2
G
1
Posts: 41
Reputation: 708


Return to How do I....?

Who is online

Users browsing this forum: bluesun66, HenryPK, Malhog, plinkie, Syazanie Amirin and 1 guest