Weirdest problem in flash evar.

Well, I had got all sorts of problems in UDK scripting history but this one it’s weeeeeeiiiird, my game has 2 arena game modes, solo and team, in both you use of a SL (scrolling list) to populate it with combatants, IDK Why in solo you receive all combatants just fine when you hit random 5 - 10 combatants and when you choose team, you get crazy amount like the array system it´s not working 70 80 then my game crashes, who the freak is hacking me XD.





//Description: This gets triggered when the button is hit
function RandomNumberOfGladiatorsEasy(event:Object)
{
//Initialized variables.
DefinitiveGladiatorsNum = 0;
NumOfLoops = 0;

ClearSLOfGladiators();



    DefinitiveGladiatorsNum = ReturnRandomNumberOfGladiators()
 trace(" FROM Solo bot taker the def num of glads is "+DefinitiveGladiators );

    if( DefinitiveGladiatorsNum < 5)
 {
  DefinitiveGladiatorsNum = 8;
 }


    for( I = 0; I < DefinitiveGladiatorsNum; I++)
 {
 trace(" FROM Solo bot taker looping ");

 GladiatorsClassInfo.push(GladiatorClassOptionStepper.dataProvider[random(5)]);

 if( random( 4 ) == 0 )
 {
  GladiatorsDifficultyInfo.push(GladiatorDifficultyOptionStepper.dataProvider[1]);
 }
 else
 {
     GladiatorsDifficultyInfo.push(GladiatorDifficultyOptionStepper.dataProvider[0]);
 }

  if( GladiatorsClassInfo[GladiatorsClassInfo.length -1] == "Gladiatrix" )
  {
      GladiatorNameInfo.push( GladiatorFemaleNames[random(GladiatorFemaleNames.length)] );
  }
  else
  {
   GladiatorNameInfo.push( GladiatorMaleNames[random(GladiatorMaleNames.length)] );
  } 


    Gladiators.push("Gladiator "+GladiatorsClassInfo.length+" "+GladiatorNameInfo[GladiatorNameInfo.length-1]+" Class "+GladiatorsClassInfo GladiatorsClassInfo.length -1 ]+" Difficulty "+GladiatorsDifficultyInfo GladiatorsDifficultyInfo.length -1 ]  );

 GladiatorClassOptionStepper.selectedIndex = random(5);

  gladiatorsolotakersl.dataProvider = Gladiators;
 gladiatorsolotakersl.invalidate();  
 }

trace( "FROM TeamBOTTAKER the num of bots is "+GladiatorsClassInfo.length );

}



Fixed it but still there is a weirdo array returning weird numbers o.O.