Hi there,
I have the following code that works fine when #pragma strict is not enabled.
var xwidth:int=7; //the width of the level on the x-axis
var ywidth:int=7; //the width of the level on the y-axis
var levelArray=new Array();
function Start() //initializes the level
{
setupUpLevelArray();
}
function setupUpLevelArray()
{
//set up the level array
//x axis loop
for(var x=0;x<ywidth;x++)
{
levelArray[x] = new Array();
//y axis loop
for(var y=0;y<ywidth;y++)
{
levelArray[x][y]="x:"+x+"y: "+y; //create cells at every instance
}
}
print(levelArray);
}
however, when I try to run it with #pragma strict, i get the error “Type ‘Object’ does not support slicing.”
Any ideas how I can do this with pragma strict enabled?