Debug ERROR click on array

Discussion and feedback on Construct 2

Post » Wed Dec 02, 2015 5:35 am

javascript error!
uncaught TypeError: Cannot read property "toString" of undefined
http//localhost:00000/Arr_plugin.js line 257 col(59)

i get the above error when i click on the array in the debug window the array size is 300,111,1
start of layout array load and i copy and paste in the DATA 33,330 words

"{""c2array"":true,""size"":[300,111,1],""data"":[[[""PLANETS NAME""],.......REST OF DATA HERE.......[100]]]}"
B
9
S
2
Posts: 66
Reputation: 717

Post » Tue Mar 22, 2016 10:47 am

Image

Same problem.
What is wrong?
B
44
S
24
G
5
Posts: 111
Reputation: 6,230

Post » Tue Mar 22, 2016 10:57 am

It's probably because your array structure is wrong, if you happened to edit it externally outside of Construct 2's event actions, such as manually editing it in Notepad++.
Zelda Gamekit (my project)



Example capxs I have made:

Zelda-Style Inventory

Zelda Hearts System
B
44
S
23
G
30
Posts: 510
Reputation: 19,273

Post » Tue Mar 22, 2016 11:12 am

try:
Code: Select all
"{""c2array"":true,""size"":[5,3,1],""data"":[[[1],[2],[3]],[[1],[2],[3]],[[1],[2],[3]],[[1],[2],[3]],[[1],[2],[3]]]}"
Image
B
61
S
23
G
7
Posts: 1,461
Reputation: 10,686

Post » Tue Mar 22, 2016 11:51 am

Thank you, it works.
Unfortunately I'm getting from the server JSON formated "[1,2,3]" and not "[1],[2],[3]"
B
44
S
24
G
5
Posts: 111
Reputation: 6,230

Post » Tue Mar 22, 2016 12:33 pm

Search How do I....? .for php json array
i think there are several post like this one make json array with php and if you don't find anything useful to you..just post new topic..
Image
B
61
S
23
G
7
Posts: 1,461
Reputation: 10,686


Return to Construct 2 General

Who is online

Users browsing this forum: rayray and 3 guests