if(!params) doesn't work? - 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: if(!params) doesn't work? (
/showthread.php?tid=280663)
if(!params) doesn't work? -
Jack_Leslie - 02.09.2011
If I just wanted to use the params instead of using multiple params resulting in needing to use sscanf, how would I check if there are no params? Thought it would of been if(!params) but I get a array must be indexed error.
Re: if(!params) doesn't work? -
Cyanide - 02.09.2011
You can check if a string's length by using
strlen.
pawn Код:
if( !strlen( params ) )
{
}
Re: if(!params) doesn't work? -
Jack_Leslie - 02.09.2011
Thanks Cyanide.
Re: if(!params) doesn't work? -
CyNiC - 02.09.2011
Or
Re: if(!params) doesn't work? -
antonio112 - 02.09.2011
Or, another way: