我是动作脚本的新手,我正在遵循动作脚本教程。我一直收到这个错误,我不知道自己哪里出错了。我搜索了谷歌,到处寻找,但似乎无法修复它。
Error: Line 19 1084: Syntax error: expecting identifier before rightparen.
代码:
package {
import flash.display.Sprite;
public class Main extends Sprite {
private var gameField:Array;
var rows:uint = 6;
var columns:uint = 7;
public function Main() {
prepareField();
}
private function prepareField():void {
gameField=new Array();
for (var i:uint=0; i<rows; i++) {
gameField[i]=new Array();
for (var j:unit=0; j<columns; j++) {
gameField[i].push(0););
}
}
trace("the field: "+gameField);
}
}
}
第19行:
gameField[i].push(0););