Can someone
#5

Quote:
Originally Posted by Funtime
Посмотреть сообщение
pawn Код:
for(new i=0; i <= MAX_PLAYERS; i++)
I've about 18 loops and most of them are the same as the one above, are they bad?
This will cause serious problems, because this loop executes one time too much.
It is a common mistake, and is known as an OBOE (Off-by-one error). The correct equivalent would be:

pawn Код:
for(new i; i < MAX_PLAYERS; i++)
Reply


Messages In This Thread
Can someone - by Jay. - 28.05.2011, 20:01
Re: Can someone - by Gamer_Z - 28.05.2011, 20:09
Re: Can someone - by Jay. - 28.05.2011, 20:13
Re: Can someone - by shitbird - 28.05.2011, 21:23
Re: Can someone - by Vince - 28.05.2011, 22:25
Re: Can someone - by linuxthefish - 28.05.2011, 23:06
Re: Can someone - by Lorenc_ - 28.05.2011, 23:42
Re: Can someone - by Calgon - 29.05.2011, 05:45
Re: Can someone - by Jay. - 29.05.2011, 18:41
Re : Can someone - by Naruto_Emilio - 29.05.2011, 18:47

Forum Jump:


Users browsing this thread: 2 Guest(s)