Continue

From ZDoom Wiki
Revision as of 21:46, 10 July 2014 by Blue Shadow (talk | contribs) (→‎Examples: Fixed example.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
continue;

Usage

continue is used in a for, do, or while loop to end the current iteration, returning to the start of the loop.


Examples

This script ignores any players that autoaim, and logs who doesn't.

for (int i = 0; i < 8; i++)
{
   if (GetPlayerInfo (i, PLAYERINFO_AIMDIST) > 0 )
      continue;

   Log (n:i+1, s:"\c- does not autoaim");
}