Help needed in format - 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)
+--- Thread: Help needed in format (
/showthread.php?tid=528155)
Help needed in format -
killing - 26.07.2014
When i use any fs related to dialogue its does not works. Cause in my game mod there is one system BIZ withdraw cause in that only numeric data has to be insterted when i use any characters data it give this
Код:
Characters detected, numbers only.
My BIZ WITHDRAW code
Код:
if(dialogid == BIZ_WITHDRAW_DIALOG)
{
if(response)
if(!IsNumeric(inputtext)) return SendClientMessage(playerid, RED, "Characters detected, numbers only.");
if(!strlen(inputtext)) return SendClientMessage(playerid, RED, "You must submit an amount to withdraw.");
if(strval(inputtext) > BizInfo[BizID[playerid]][bEarnings]) return SendClientMessage(playerid, RED, "Insufficient funds.");
if(strval(inputtext) > 10000000) return SendClientMessage(playerid, RED, "You can only withdraw $10M at a time");
BizInfo[BizID[playerid]][bEarnings] = BizInfo[BizID[playerid]][bEarnings] - strval(inputtext);
GivePlayerCash(playerid, strval(inputtext));
format(fstr, sizeof(fstr), "You have withdrawn $%d from your business earnings.", strval(inputtext));
SendClientMessage(playerid, WHITE, fstr);
new file[40];
format(file, sizeof(file), BIZ_FILE, BizID[playerid]);
new INI:bFilee = INI_Open(file);
INI_WriteInt(bFilee, "bEarnings", BizInfo[BizID[playerid]][bEarnings]);
INI_Close(bFilee);
}
Pls add something into it when can allow both Charaters and numeric please i really need help
Re: Help needed in format -
[KHK]Khalid - 26.07.2014
Remove this line? Though, not sure if the script will work efficiently then.
pawn Код:
if(!IsNumeric(inputtext)) return SendClientMessage(playerid, RED, "Characters detected, numbers only.");
Re: Help needed in format -
killing - 26.07.2014
SO we cant withdraw lol
Re: Help needed in format -
NaClchemistryK - 26.07.2014
Can you explain your problem in a better way?
Re: Help needed in format -
killing - 26.07.2014
YEs
When i use any fs which is based on dialogue that wont work cause this error comes
Код:
Characters detected, numbers only.
So when i copied this Line and in pawno i search fot this line so this line was in
Код:
if(dialogid == BIZ_WITHDRAW_DIALOG)
{
if(response)
if(!IsNumeric(inputtext)) return SendClientMessage(playerid, RED, "Characters detected, numbers only.");
if(!strlen(inputtext)) return SendClientMessage(playerid, RED, "You must submit an amount to withdraw.");
if(strval(inputtext) > BizInfo[BizID[playerid]][bEarnings]) return SendClientMessage(playerid, RED, "Insufficient funds.");
if(strval(inputtext) > 10000000) return SendClientMessage(playerid, RED, "You can only withdraw $10M at a time");
BizInfo[BizID[playerid]][bEarnings] = BizInfo[BizID[playerid]][bEarnings] - strval(inputtext);
GivePlayerCash(playerid, strval(inputtext));
format(fstr, sizeof(fstr), "You have withdrawn $%d from your business earnings.", strval(inputtext));
SendClientMessage(playerid, WHITE, fstr);
new file[40];
format(file, sizeof(file), BIZ_FILE, BizID[playerid]);
new INI:bFilee = INI_Open(file);
INI_WriteInt(bFilee, "bEarnings", BizInfo[BizID[playerid]][bEarnings]);
INI_Close(bFilee);
}