[HELP]Withdraw problem
#1

I want the withdraw money command to be accesible from 2 areas so i made this :

pawn Код:
if(strcmp(cmd, "/withdraw", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_GREY, "USAGE: /withdraw [amount]");
            return 1;
        }
        giveplayerid = strval(tmp);
        if (PlayerToPoint(8, playerid,364.1431,173.7478,1008.3828)) || PlayerToPoint(10, playerid, -25.6093,-137.7065,1003.5469)
        {
            if(giveplayerid <= PlayerInfo[playerid][pBank] && giveplayerid >= 0)
            {
                format(string, sizeof(string), "You have withdrawed %d$ money from your bank account.",giveplayerid);
                SendClientMessage(playerid, COLOR_GREEN, string);
                GivePlayerMoney(playerid, giveplayerid);
                PlayerInfo[playerid][pBank] = PlayerInfo[playerid][pBank]-giveplayerid;
                CreateBankMoneyTextDraw(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED,"You do not have that money on your bank, type /balance to view your bank money.");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED,"You must be at the bank to do this command.");
        }
        return 1;
    }
But if i compile i get these errors :

pawn Код:
D:\Games\GTA San Andreas\server\gamemodes\slrpg.pwn(9365) : error 029: invalid expression, assumed zero
D:\Games\GTA San Andreas\server\gamemodes\slrpg.pwn(9366) : error 001: expected token: ";", but found "{"
D:\Games\GTA San Andreas\server\gamemodes\slrpg.pwn(9380) : error 029: invalid expression, assumed zero
Reply


Messages In This Thread
[HELP]Withdraw problem - by [Aka]Dragonu - 05.12.2010, 13:46
Re: [HELP]Withdraw problem - by JaTochNietDan - 05.12.2010, 13:47
Re: [HELP]Withdraw problem - by [Aka]Dragonu - 05.12.2010, 14:19
Re: [HELP]Withdraw problem - by JaTochNietDan - 05.12.2010, 14:29
Re: [HELP]Withdraw problem - by [Aka]Dragonu - 05.12.2010, 14:39
Re: [HELP]Withdraw problem - by JaTochNietDan - 05.12.2010, 14:40
Re: [HELP]Withdraw problem - by [Aka]Dragonu - 05.12.2010, 14:41
Re: [HELP]Withdraw problem - by JaTochNietDan - 05.12.2010, 14:42
Re: [HELP]Withdraw problem - by [Aka]Dragonu - 05.12.2010, 14:45

Forum Jump:


Users browsing this thread: 3 Guest(s)