army is declared in the class
When I try to declare the newEnemy, the code doesn't work, here is what I done:Code:public var army:Array;
P.S. I don't know how to declare newEnemy in such a way so it doesn't interfere with other code and i also get a warning:Code:for (var i:int = army.length-1; i>=0; i--) { var newEnemy=new Enemy(x,y); var nme:Enemy = army[i]; if (newEnemy.hitTestObject(nme)) { nme.y+=120; } }
Code:Warning: 3596: Duplicate variable definition.




Reply With Quote
