Need help with random
#4

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
It is random but that will not work.
Using random(1) will return 0 all the time. Use:
pawn Код:
switch (random(2))
{
    case 0:
    {
        // code..
    }
    default: // 1
    {
        // code..
    }
}
Why he's using swtich instead normal if-statement?
Reply


Messages In This Thread
Need help with random - by GoldenLion - 09.05.2016, 17:46
Re: Need help with random - by Konstantinos - 09.05.2016, 17:53
Re: Need help with random - by F1N4L - 09.05.2016, 18:03
Re: Need help with random - by vannesenn - 09.05.2016, 18:09
Re: Need help with random - by GoldenLion - 09.05.2016, 18:35

Forum Jump:


Users browsing this thread: 1 Guest(s)