Sscanf - 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: Sscanf (
/showthread.php?tid=188529)
Sscanf -
Th3Angel - 08.11.2010
I'm getting this warning:

Can someone tell me what it means?
pawn Код:
new id;
new reason[64];
if(sscanf(params, "iz", id, reason)) return SendClientMessage(playerid, COLOR_MEDIUMRED, "Message...");
Re: Sscanf -
Burridge - 08.11.2010
pawn Код:
if(sscanf(params, "is[64]", id, reason)) return SendClientMessage(playerid, COLOR_MEDIUMRED, "Message...");
Re: Sscanf -
Miguel - 08.11.2010
You have to use "s[size_here]" for strings.
pawn Код:
if(sscanf(params, "is[63]", id, reason)) return SendClientMessage(playerid, COLOR_MEDIUMRED, "Message...");
Re: Sscanf -
Th3Angel - 08.11.2010
Yea, but I want the string to be optional. If there is just /command 3 and no string, i still want the command to be processed.
Re: Sscanf -
Th3Angel - 08.11.2010
Mmmmmm. Can anyone help me?
Re: Sscanf -
smeti - 08.11.2010
pawn Код:
if(sscanf(params, "iS(No reason)[128]", id, reason)) return SendClientMessage(playerid, COLOR_MEDIUMRED, "Message...");
Quote:
S(string)[length] //Optional string
|
Re: Sscanf -
Th3Angel - 09.11.2010
Thanks for your help guys