SA-MP Forums Archive
[Solved] Loop question - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Solved] Loop question (/showthread.php?tid=119842)



[Solved] Loop question - SiJ - 09.01.2010

Hey,
I got this code:
pawn Код:
stock MakePNumber()
{
  new number = Random(1,10); //Random is function rand(min,max);
  if(IsValidPNumber(number)) //Checks if number isn't already saved
  {
        SavePNumber(number); //Saves number
        return number;
    }
    else MakePNumber();
    return 1;
}
Will it loop if IsValidPNumber(number) returns false?
It does loop.