Why i can't load data from this array to another array?

Get help using Construct 2

Post » Tue May 09, 2017 7:42 pm

You probably butchered something along the way cause I tested it to be sure I wasn't saying nonsense. :P

Here's the correct version : https://pastebin.com/ZRLgKdzg
B
69
S
28
G
24
Posts: 977
Reputation: 18,739

Post » Tue May 09, 2017 8:54 pm

Unless I am mistaken....your main problem is that you are trying to load 3 or 4 arrays all into the same array at the same time.

each time you see "{""c2array"":true,""size"":[X, Y,Z ],""data"":[[[datablablabla....... that is the start of a new array

you should only see this once at the start of your json text string.
...
B
44
S
23
G
7
Posts: 286
Reputation: 7,985

Post » Tue May 09, 2017 9:55 pm

Yeah, i'm trying to load different sequences (arrays) as JSON into one array. I managed to do this with Dictionary, i guess i can't use array for this.
B
14
S
3
G
1
Posts: 95
Reputation: 1,015

Post » Tue May 09, 2017 9:57 pm

That's what he's trying to do. His array contains multiples arrays stored as JSON. The problem is getting the correct inline string that the expression editor will understand. My pastebin is the proper way to do it. You can load a first array with the litteral string, then load a second array doing something like "Load from JSON string FirstArray.At(2,1)"
B
69
S
28
G
24
Posts: 977
Reputation: 18,739

Post » Tue May 09, 2017 10:06 pm

@Magistross

You can do that !!! I didn't know. Wow....

and that would be exactly what you need to make a music sequencer .....

damn I wish I knew that before it might have saved me a few complications in my game......

I need to go away and look at your pastebin...

cheers...
...
B
44
S
23
G
7
Posts: 286
Reputation: 7,985

Previous

Return to How do I....?

Who is online

Users browsing this forum: blue visionary, OBLIVION and 15 guests