SA-MP Forums Archive
Dialog does not respond correct. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dialog does not respond correct. (/showthread.php?tid=120072)



Dialog does not respond correct. - Austin_Lynn - 10.01.2010

I want it to withdraw the amount I type in the dialog.
But it says $0 was withdrawn from your account.

pawn Код:
if(response)
    {
        if(dialogid == BANKMENU)
        {
    new tmp[256];
  new cashdeposit = strval(tmp);
          ConsumingMoney[playerid] = 1;
          GivePlayerMoney(playerid,cashdeposit);
          PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
          format(string, sizeof(string), " ** You Have Withdrawn $%d from your account Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
          SendClientMessage(playerid, COLOR_GREEN, string);
          return 1;
        }
    }



Re: Dialog does not respond correct. - lameguy - 10.01.2010

So you enter the amount you want to withdraw to input dialog?

So now you have:
new cashdeposit = strval(inputtext);

I think that is your problem


Re: Dialog does not respond correct. - mansonh - 11.01.2010

Yah as Johnson said, you are trying to get something from tmp which is nothing.
You want to use
pawn Код:
new cashdeposit = strval(inputtext);