0
votes

Basically I'm trying to insert a number into a 2D array like this:

arrayName[X][Y] = 4;

but I get an error that says:

TypeError: Error #1010: A term is undefined and has no properties.

so how do I fix this or do it properly?

1
The error is trying to tell you that the inner Array doesn't exist at index X. Show us how you created the 2D Array. - user2655904

1 Answers

0
votes
var arrFirst:Array = [];
var arrSecond:Array = [];
arrSecond[Y] = 4;
arrFirst[X] = arrSecond;