我对以下代码感到困惑:
function placeShuffleFishs():void
{
for (var i:int 0; i<shuffleRoom.length; ++i) //syntax error: expecting semicolon before 0.
{
addChild(shuffleRoom[i]);
shuffleRoom[i].x = int(xValues[i]);
shuffleRoom[i].y = 80;
}
}
请让我知道如何解决这个问题, 感谢
答案 0 :(得分:1)
您忘记添加 =
...
for (var i:int = 0; i<shuffleRoom.length; ++i)
...