- Home /
Question by
ASmithPredSoft · Jul 30, 2013 at 02:26 PM ·
arrayerror messageslicing
BCE0048 Error appears when switching platform but works when building for a PC?
Hello, I hope there is someone out there who can help me out. I am currently trying to build an array where it will instantiate objects into a level once it is loaded. It works fine for the PC standalone and the Web builds but when converting to Android it brings up an error saying: The 'object' does not support slicing.
Here is a snippet of the code for people to have a look at.
//create array for the level
var build = new Array(11,11);
var xOffset: int = 0;
var zOffset: int = 99;
switch (a1LvlNo){
case 1:
build =[
[4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4],
[4, 4, 4, 3, 3, 4, 4, 4, 3, 3, 3, 4, 4],
[4, 4, 3, 2, 3, 4, 4, 3, 3, 3, 3, 3, 4],
[4, 4, 3, 3, 3, 4, 4, 3, 3, 1, 3, 3, 4],
[4, 4, 4, 3, 3, 4, 4, 3, 3, 3, 3, 3, 4],
[4, 4, 4, 3, 3, 4, 4, 4, 3, 3, 3, 3, 4],
[4, 4, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 4],
[4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4],
[4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4],
[4, 4, 4, 3, 4, 3, 3, 3, 3, 3, 3, 4, 4],
[4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4] ];
break;
}//}
for (row = 0; row < 11; row ++) {
for (col = 0; col < 11; col ++) {
//Creates the sand tile
if (build[row][col] == 4){
newX = xOffset + col;
newZ = zOffset - row;
playArea[newX,newZ] = Instantiate (zeroSand1, Vector3(newX, 2, newZ), transform.rotation);
}
}
}
Please can someone help me!!!!!
Comment