我在函数中收到错误 #1010,我想知道错误具体在哪里?谢谢!
public function getSide(point:Point,mag:Number):int
{
if (level.map[int(point.x - mag / 32)][int(point.y / 32)].typ != 2)
{
return 0;
}
else if (level.map[int(point.x / 32)][int(point.y+mag / 32)].typ!=2)
{
return 1;
}
else if (level.map[int(point.x+mag / 32)][int(point.y / 32)].typ!=2)
{
return 2;
}
else if (level.map[int(point.x / 32)][int(point.y-mag / 32)].typ!=2)
{
return 3;
}else{
return getSide(point,mag+1);
}
}