sscanf2 and zcmd
#5

@willsuckformoney that's not what I mean.

@RealCop228:

I already read the topic from ages.

Quote:

You will notice that you do not need to add the exclamation point (!) before calling sscanf. Above would be the proper way to use sscanf.

AFAIK "!" isn't useless.
pawn Code:
if(sscanf(params,"s[129] ",string)) return SendClientMessage(playerid,xxx,"This message will sent if player isn't type any params/wrong params.");
if(!sscanf(params,"s[129] ",string)) return SendClientMessage(playerid,xxx,"This message will sent if player type any correct params.");
Quote:

In your given code example, using sscanf for such a thing is worthless. You could easily use the in-built isnull function which is inside the ZCMD include. An example:

I'm just sorting about a simple method.

Quote:

1) That would most likely give you an error when you attempt to compile- it is pointless to change the length of the params variable.

It didn't give me any error. I just don't know why there's no size in params (Actually Idk why every funtion don't have size like OnPlayerCommandText(playerid,text[])
Reply


Messages In This Thread
sscanf2 and zcmd - by letters - 18.07.2011, 02:05
Re: sscanf2 and zcmd - by Kaperstone - 18.07.2011, 02:08
Re: sscanf2 and zcmd - by willsuckformoney - 18.07.2011, 02:18
Re: sscanf2 and zcmd - by Scenario - 18.07.2011, 02:20
Re: sscanf2 and zcmd - by letters - 18.07.2011, 02:41
Re: sscanf2 and zcmd - by Bakr - 18.07.2011, 06:38

Forum Jump:


Users browsing this thread: 1 Guest(s)