actionscript 3 - AS3 Functions: is it possible to return a value inside of a loop? -


I am trying to find the pointer using a loop function, but I am getting an error:

  Private function findMatch (matchValue: int): int {for (var i: int = 0; i & lt; playersList.length; i ++) {if (player list [i] Value + matchValue == levelTarget) {return i; }}}  

Is it not possible to return any value from the inside of the loop, or instead, I get an error every time not returns a value ?!?

  findMatch the private function (matchValue: int): int {var _i: int = -1 ; (Var i: int = 0; i  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -