- Home /
This question was
closed Jan 02, 2013 at 12:37 PM by
goo-muffin for the following reason:
The question is answered, right answer was accepted
array of integer array show compiler error
HI!
I'd like to create an array of integer arrays like this:
var fieldContents :int[][];
But this schows me a compiler error. (Sorry I'm still used to Java not javascript ;D )
Comment
Answer by Graham-Dunnett · Jan 01, 2013 at 06:30 PM
Use:
var fieldContents :int[,] = new int[2,3];
and later on:
fieldContents[0,0] = 17;
fieldContents[1,2] = 42;
Follow this Question
Related Questions
Tagged objects not returning value 0 Answers
Error when trying to set variable with array 1 Answer
IndexOutOfRangeException help on debug 3 Answers
NullReferenceException array 2 Answers