while
#2

Basically it works the same as the Loo, showing us your CODE would help.

pawn Код:
//Easier but rarely used or mostly used by experienced scripters
new
    i = 0;

while(i < MAX_PLAYERS)
{
    //do stuff here
    i++;
}

// Mostly used by beginners, the code looks long, but it's mostly used by people
for(new i = 0; i < MAX_PLAYERS; i++)
{
    // Do stuff here
}

//loops means increasing the variable by 1 until it reaches the maximum value.
Reply


Messages In This Thread
while - by audriuxxx - 21.12.2013, 17:30
Re: while - by Patrick - 21.12.2013, 17:39
Re: while - by Konstantinos - 21.12.2013, 18:01

Forum Jump:


Users browsing this thread: 1 Guest(s)