Error help
#3

You haven't given 'amount' any value. I'm just going to assume that 'amount' is the value of the text inputted into the dialog. "amount = strval(inputtext)".

pawn Код:
if(dialogid == 12)
    {
        if(!response) return 1;
        new amount = strval(inputtext);
        switch(listitem)
        {
            case 0:
            {
                if(!amount) return SendClientMessage(playerid, COLOR_GREEN, "Invalid amount.");
                GiveBankMoney(playerid, 500);
                GiveMoney(playerid, -500);
            }
            case 1:
            {
                if(!amount) return SendClientMessage(playerid, COLOR_GREEN, "Invalid amount.");
                GiveMoney(playerid, -amount);
                GiveBankMoney(playerid, amount);
            }
            case 2:
            {
                if(!amount) return SendClientMessage(playerid, COLOR_GREEN, "Invalid amount.");
                GiveMoney(playerid, amount);
                GiveBankMoney(playerid, -amount);
            }
            case 3:
            {
                if(!amount) return SendClientMessage(playerid, COLOR_GREEN, "Invalid amount.");
                GiveMoney(playerid, -amount);
                GiveSavings(playerid, amount);
            }
            case 4:
            {
                if(!amount) return SendClientMessage(playerid, COLOR_GREEN, "Invalid amount.");
                GiveMoney(playerid, amount);
                GiveSavings(playerid, -amount);
            }
            case 5:
            {
                if(!amount) return SendClientMessage(playerid, COLOR_GREEN, "Invalid amount.");
                GivePlayerMoney(playerid, -100000);
            }
        }
        return 1;
    }
Reply


Messages In This Thread
Error help - by ZachKnoxx - 11.10.2014, 02:05
Re: Error help - by Chenko - 11.10.2014, 02:08
Re: Error help - by Threshold - 11.10.2014, 02:09
Re: Error help - by ZachKnoxx - 11.10.2014, 02:10
Re: Error help - by Chenko - 11.10.2014, 02:58

Forum Jump:


Users browsing this thread: 2 Guest(s)