I'm trying to instantiate a grid using cubes with this shape
I'm trying to use a multidimensional array for this but I have problems initializing the array with set values.
public var multiDimensionalArray: int[,] = [
[0,1,1,0],
[1,0,0,1],
[1,0,0,1],
[0,1,1,0]
];
Above is the first method I've tried but it throws the following error
Assets/TetrisPiece.js(7,45): BCE0022: Cannot convert 'int[][]' to 'int[,]'.
I've also tried storing an array in a array
var myArray: int[4];
myArray[0] = new int[0,1,1,0];
myArray[1] = new int[1,0,0,1];
myArray[2] = new int[1,0,0,1];
myArray[3] = new int[0,1,1,0];
But this shows the following error:
Assets/TetrisPiece.js(1,17): UCE0001: ';' expected. Insert a semicolon at the end.
I suspect a syntax error but I haven't been able to find what. Thanks in advance.