05.01.2010, 20:01
Hello,
I want write a banksystem with Dialog.
I try it, but it doesnt work.
Please Help Me. How can I write this![Huh?](images/smilies/confused.gif)
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);
}
}
}
I want write a banksystem with Dialog.
I try it, but it doesnt work.
Please Help Me. How can I write this
![Huh?](images/smilies/confused.gif)
THANKS!!!
Error:
C:\Users\Shinoda\Desktop\samp03asvr_R4_win32\gamem odes\gf.pwn(962
![Cool](images/smilies/cool.gif)
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
![Cool](images/smilies/cool.gif)
if(cash2 < kontotemp)
{
SendClientMessage(playerid, COLOR_YELLOW, "You do not have enough money.");
}
else
{
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]+kontotemp;
GivePlayerMoney(playerid, -kontotemp);
}
}
}