/bet command help
#4

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
pawn Код:
CMD:bet(playerid,params[])
{
    new money;
    if(!sscanf(params, "d",money))
    {
        new rand = random(10);
        if(rand == 5)
        {
            SendClientMessage(playerid,green,"You won! %i$",money*2);
            GivePlayerMoney(playerid,money*2);
        }
        else
        {
            SendClientMessage(playerid,red,"You lose %i$...AHAH!",money);
            GivePlayerMoney(playerid,-money);
        }
        if(money < 0) SendClientMessage(playerid red,"Invalid ammount to bet.");
    }
    else return SendClientMessage(playerid, red, "Usage: /bet [Money to bet]");
    return 1;
}
Thanks,now i get errors at this lines:
pawn Код:
SendClientMessage(playerid,green,"You won %i$!",money*2);
pawn Код:
SendClientMessage(playerid,red,"You lose %i$...AHAH!",money);
pawn Код:
if(money < 0) SendClientMessage(playerid red,"Invalid ammount to bet.");
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
error 001: expected token: ",", but found "-integer value-"
warning 215: expression has no effect
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Reply


Messages In This Thread
/bet command help - by Face9000 - 15.05.2012, 13:54
Re: /bet command help - by ViniBorn - 15.05.2012, 14:01
AW: /bet command help - by Forbidden - 15.05.2012, 14:01
Re: /bet command help - by Face9000 - 15.05.2012, 14:05
Re: /bet command help - by ViniBorn - 15.05.2012, 14:06
Re: /bet command help - by Face9000 - 15.05.2012, 14:21

Forum Jump:


Users browsing this thread: 1 Guest(s)