Can't read data from a 3D array

Discussion and feedback on Construct 2

Post » Tue Feb 21, 2017 2:27 pm

Hello
I've made a JSON databse and loaded it into a 3D array, but can't seem to read any data from the array.
The array did get the data - checked with the debugger.
I've downloaded a 2D array capx tutorial that reads data from an array and views it on a textbox. I've changed it so it would read a 3D array to check what's wrong, and it seems that the array is bad itself.
Can't figure out what the problem is...

This is the CAPX
https://www.dropbox.com/s/1sv23khl7plowdn/3d%20array.capx?dl=0

Any ideas?
Thanks
B
4
S
1
Posts: 6
Reputation: 262

Post » Tue Feb 21, 2017 2:54 pm

Your format is incorrect. This is what C2 outputs as a 12x5x4 array


{"c2array":true,"size":[12,5,4],"data":[[[0,0,0,"99"],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]]}
ImageImageImage
B
71
S
21
G
221
Posts: 3,649
Reputation: 124,227

Post » Tue Feb 21, 2017 8:10 pm

Thanks! I never would be figuring this out by myself...
Aren't there any JSON debugger in C2?
B
4
S
1
Posts: 6
Reputation: 262


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 5 guests