invalid array length error

Get help using Construct 2

Post » Wed Jun 12, 2013 7:33 pm

I moved over an event sheet that generates terrain to a new project. For some reason every time I run it inside the new project I get an "invalid array length" error dialog.

I've tried everything, but no matter what it still errors. The only time it doesn't is when I disable the event that sets the size of one of my arrays. I know the problem is there, but no matter what size I set it to it says the same error.

Sorry for the lack of .capx, but it is part of a massive project.

Has anyone seen this javascript error before?
B
5
S
2
G
1
Posts: 28
Reputation: 765

Post » Wed Jun 12, 2013 8:16 pm

Are you sure the array is set to global, and are you also sure that the array is part of a layout that has already been executed before you try to execute your events ?
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
276
S
103
G
84
Posts: 7,288
Reputation: 83,091

Post » Wed Jun 12, 2013 8:21 pm

The arrays are global. What do you mean by making sure the array is part of a layout?
B
5
S
2
G
1
Posts: 28
Reputation: 765

Post » Wed Jun 12, 2013 8:24 pm

I switched them to local arrays and the error went away. Thank you for leading me down that path!
B
5
S
2
G
1
Posts: 28
Reputation: 765


Return to How do I....?

Who is online

Users browsing this forum: Artpunk, kiugetski, RealMagisterLudi and 8 guests