need help with strcmp - 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: need help with strcmp (
/showthread.php?tid=442123)
need help with strcmp -
horsemeat - 06.06.2013
ok I have this code here
it is under ondialogresponse
I entered the print code and it seems to work properly
pawn Код:
print(inputtext);//remove
if(strcmp(inputtext,"",true,0)==0)
{
return SendClientMessage(playerid, RED, "You can't name the map nothing");
}
it does not seem to be working so I went to samp wiki to check the syntax and I notice something it said
Quote:
Important Note: This function also returns 0 if either string is empty.
|
so how would I check if a string is valid
Re: need help with strcmp -
PaulDinam - 06.06.2013
if(isnull(inputtext)) >> Used to check if its' null
or for checking another string:
if(!strcmp(inputtext, "string inside"))
Re: need help with strcmp -
Om3n - 06.06.2013
better try
https://sampwiki.blast.hk/wiki/Strlen
Re: need help with strcmp -
horsemeat - 06.06.2013
Quote:
Originally Posted by PaulDinam
if(isnull(inputtext)) >> Used to check if its' null
or for checking another string:
if(!strcmp(inputtext, "string inside"))
|
Thanks
is just what I needed