Help with a loop. [EASY]
#1

So I made a loop to count throguh all the ONLINE players on the server, but it keeps counting to 500 no matter what (I was the only one on the server).

pawn Code:
new i;
i = 0;
loop:
if(i > MAX_PLAYERS) goto loop_stop;
if(something == 1)
{
   //do something
   i++;
   goto loop;
}
else
{
   i++;
   goto loop;
}
loop_stop:
//do something
return 1;
WHAT'S WRONG WITH THIS CODE?!
Reply


Messages In This Thread
Help with a loop. [EASY] - by $Marco$ - 04.03.2015, 13:02
Re: Help with a loop. [EASY] - by Jimmy0wns - 04.03.2015, 13:08
Re : Re: Help with a loop. [EASY] - by $Marco$ - 04.03.2015, 13:12
Re: Help with a loop. [EASY] - by Schneider - 04.03.2015, 13:15
Re : Help with a loop. [EASY] - by Golimad - 04.03.2015, 13:17
Re : Re: Help with a loop. [EASY] - by $Marco$ - 04.03.2015, 13:18
Re : Help with a loop. [EASY] - by Golimad - 04.03.2015, 13:20
Re : Help with a loop. [EASY] - by $Marco$ - 04.03.2015, 13:22
Re : Help with a loop. [EASY] - by Golimad - 04.03.2015, 13:26
Re: Re : Help with a loop. [EASY] - by $Marco$ - 04.03.2015, 13:28

Forum Jump:


Users browsing this thread: 1 Guest(s)