Multidimensional Arrays in JS

Having some problems getting this to work…
I read somewhere her on the forum that builtin arrays didnt support multidimensional arrays, and that this was a solution:

var list : Array = new Array(5);

for(var i = 0; i < 5; i++) 
{ 
	list[i] = new Array(10); 
}

And then you should be able to set values as normal i.e

list[0][2] = "My Nice String"

But the last codeline gives me this error:

Type 'Object' does not support slicing.

What does this mean and how can I solve my multidim arrayproblem?

Actually builtin arrays can be multidimensional, but unfortunately there doesn’t seem to be a way to construct them from scratch in Javascript, which limits their usefulness (you can do this in C# though).

Anyway, this method uses dynamic typing, so turn off “#pragma strict”. Then it will work.

–Eric

Well obviously it was much easier than that…

I had just missed this:

var list : Array**[ ]** = new Array(5);

.<

Works like a charm now!