for cycle - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: for cycle (
/showthread.php?tid=311745)
for cycle -
Macluawn - 18.01.2012
pawn Код:
for(new i = 0; i < 67; i++) printf("%d", i);
prints 48,49,50
.... 65,66
where are 0 - 47?
Explanation?
Re: for cycle -
Gh05t_ - 18.01.2012
pawn Код:
main()
{
for(new i = 0; i != 67; i++) printf("%d", i);
}
https://sampforum.blast.hk/showthread.php?tid=305770
Re: for cycle -
Macluawn - 18.01.2012
I didnt ask for someone to test it.
I wanted to know what could cause something like that to happen.
Re: for cycle - T0pAz - 18.01.2012
Quote:
Originally Posted by Macluawn
I didnt ask for someone to test it.
I wanted to know what could cause something like that to happen.
|
It should not happen. This is most likely a problem on your code.
Re: for cycle -
Macluawn - 18.01.2012
Quote:
Originally Posted by T0pAz
It should not happen.
|
That's quite obvious.
Could anyone explain what causes it, and possibly, how to avoid it. Thanks.