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
61
S
31
G
6
Posts: 125
Reputation: 7,895

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:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
51
S
24
G
30
Posts: 534
Reputation: 19,620

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]]]}"
B
66
S
24
G
7
Posts: 1,514
Reputation: 11,039

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
61
S
31
G
6
Posts: 125
Reputation: 7,895

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..
B
66
S
24
G
7
Posts: 1,514
Reputation: 11,039


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 8 guests