Need Help with Dialogresponse
#1

Hello,
I want write a banksystem with Dialog.
I try it, but it doesnt work.
Please Help Me. How can I write this
THANKS!!!

Error:
C:\Users\Shinoda\Desktop\samp03asvr_R4_win32\gamem odes\gf.pwn(962 : error 033: array must be indexed (variable "kontotemp")
C:\Users\Shinoda\Desktop\samp03asvr_R4_win32\gamem odes\gf.pwn(9634) : error 033: array must be indexed (variable "kontotemp")
C:\Users\Shinoda\Desktop\samp03asvr_R4_win32\gamem odes\gf.pwn(9635) : error 035: argument type mismatch (argument 2)
CODE:
--------------

ShowPlayerDialog(playerid,301,DIALOG_STYLE_INPUT," Deposit","How much money do you want to deposit?","Yes", "No");

--------------

if(dialogid == 301)
{
new targetid;
new cash2 = GetPlayerMoney(targetid);
new kontotemp[128];
if(strlen(inputtext))
{
strmid(kontotemp, inputtext, 0, strlen(inputtext), 12;
if(cash2 < kontotemp)
{
SendClientMessage(playerid, COLOR_YELLOW, "You do not have enough money.");
}
else
{
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]+kontotemp;
GivePlayerMoney(playerid, -kontotemp);
}
}
}
Reply
#2

pawn Код:
if(dialogid == 301)
{
    new targetid;
    new cash2 = GetPlayerMoney(targetid);
    new kontotemp[128];
    if(strlen(inputtext))
    {
        strmid(kontotemp, inputtext, 0, strlen(inputtext), 128);
        if(cash2 < strval(kontotemp))
        {
            SendClientMessage(playerid, COLOR_YELLOW, "You do not have enough money.");
        }
        else
        {
            PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]+strval(kontotemp);
            GivePlayerMoney(playerid, -strval(kontotemp));
        }
    }
}
Try that
Reply
#3

It works!
Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)