/bet command help
#1

error 012: invalid function call, not a valid address
error 017: undefined symbol "d"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

pawn Код:
CMD:bet(playerid,params[])
{
    if(!sscanf(params, "d"))
    {
    new money = params(d),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;
}
Line 3227:

pawn Код:
new money = params(d),rand = random(10);
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)