Page 1 of 1

can't stop the loop

Posted: Thu Feb 19, 2004 6:29 pm
by digitac

Code: Select all

		for ( local.n = 1 ; local.n <= $player.size ; local.n++ ) 
		{ 
			if ( $player[local.n].dmteam == "axis" )
			{
				if ( !isalive $player[local.n] )
				{	
					level.prisax++
				}
				level.as++
			}
			else if ( $player[local.n].dmteam == "allies" )
			{
				if (!isalive $player[local.n] )
				{
					level.prisal++
				}
				level.al++
			}
			else 
			{
				level.spec++
			}
		}
Any1 have a sollution for my problem

i want that the loop stops

try this

Posted: Thu Feb 19, 2004 11:00 pm
by tltrude
Try this:

Code: Select all

for ( local.n = 1 ; local.n <= $player.size ; local.n++ )
      $player = parm.other
      { 
         if ( $player[local.n].dmteam == "axis" ) 
         { 
            if ( !isalive $player[local.n] ) 
            {    
               level.prisax++ 
            } 
            level.as++ 
         } 
         else 
            if ( $player[local.n].dmteam == "allies" ) 
            { 
            if (!isalive $player[local.n] ) 
            { 
               level.prisal++ 
            } 
            level.al++ 
         } 
         else 
         { 
            level.spec++ 
         } 
      }