InputText - 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: InputText (
/showthread.php?tid=160538)
InputText -
(.Aztec); - 17.07.2010
I'm trying to do the following:
pawn Код:
if(inputtext < 18 || inputtext > 99) { return SendClientMessage(playerid, red, "[ERROR] Invalid Age."); }
How would I go about doing that? I've currently got the code above, and it's giving me this error:
Quote:
Originally Posted by PAWNO
error 033: array must be indexed (variable "inputtext")
|
Re: InputText -
Kar - 17.07.2010
why do u have brackets in that?
Re: InputText -
bigcomfycouch - 17.07.2010
pawn Код:
if(strval(inputtext) < 18 || strval(inputtext) > 99)
return SendClientMessage(playerid, red, "[ERROR] Invalid Age.");
Re: InputText -
(.Aztec); - 17.07.2010
Because you kind of need them?
pawn Код:
if(inputtext > 18 || inputtext > 99)
{
SendClientMessage(playerid, red, "[ERROR] Invalid Age.");
return 1;
}
Is that a bit easier to read for you?
Quote:
Originally Posted by bigcomfycouch
pawn Код:
if(strval(inputtext) < 18 || strval(inputtext) > 99) return SendClientMessage(playerid, red, "[ERROR] Invalid Age.");
|
Thank you very much, I was looking for strval.