if(!params) doesn't work?
#1

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.
Reply
#2

You can check if a string's length by using strlen.

pawn Код:
if( !strlen( params ) )
{

}
Reply
#3

Thanks Cyanide.
Reply
#4

Or
pawn Код:
if(!params[0])
Reply
#5

Or, another way:

pawn Код:
if(isnull(params))
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)