random
#6

You need to finish the switch before using other functions.
pawn Код:
new string[ 120 ],
        rspin = random( 36 ) +1;
       
switch(random( 36 ) +1)
{
    case 1, 3, 5, 7, 9, 12, 14, 16, 18, 21, 23, 25, 27, 28, 30, 32, 34, 36: format(string, 120, "{8d97f4}* %s spins and stops at %d color  is {c12121}red{ffffff}.", GetPlayerNameEx(playerid),rspin);
    case 2, 4, 6, 8, 10, 11, 13, 15, 17, 19, 20, 22, 24, 26, 29, 31, 33, 35: format(string, 120, "{8d97f4}* %s spins and stops at %d color is {222222}black{ffffff}.", GetPlayerNameEx(playerid),rspin);
}
ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
Quote:

warning 209: function "cmd_spin" should return a value

You need to use "return 1;" at the end of your command.
Example using zcmd:
pawn Код:
CMD:whatever(playerid, params[])
{
    // Codes
    return 1;
}
Reply


Messages In This Thread
random - by tooMuch - 30.01.2015, 18:53
Re: random - by Schneider - 30.01.2015, 19:04
Re: random - by CalvinC - 30.01.2015, 19:06
Re: random - by tooMuch - 30.01.2015, 19:07
Re: random - by tooMuch - 30.01.2015, 19:35
Re: random - by CalvinC - 30.01.2015, 19:49
Re: random - by tooMuch - 30.01.2015, 20:30
Re: random - by tooMuch - 30.01.2015, 20:46

Forum Jump:


Users browsing this thread: 1 Guest(s)