sscanf parameter - 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: sscanf parameter (
/showthread.php?tid=659951)
sscanf parameter -
Zeus666 - 21.10.2018
if(sscanf(params, "us[105]",reason)) return SendClientMessage(playerid,-1,""chat" /(re)port [Reason]");
what should I write instead of US105?
Re: sscanf parameter -
GTLS - 21.10.2018
they are format specifiers. 'u' is used to return a USER using his name/ID and 's' for a simple string.
More:
https://sampforum.blast.hk/showthread.php?tid=570927
Re: sscanf parameter -
KinderClans - 21.10.2018
[105] is the string length for "reason". Also you're specifing 2 parameters but passing only one.
pawn Код:
if(sscanf(params, "s[80]",reason)) return SendClientMessage(playerid,-1,""chat" /(re)port [Reason]");
80 chars are enough.
@GTLS: He could also use "r" for userid/name.
Re: sscanf parameter -
GTLS - 21.10.2018
Quote:
Originally Posted by KinderClans
[105]
@GTLS: He could also use "r" for userid/name.
|
I know about 'r'. I explained what are 'u' and 's' and linked him to sscanf thread nothing else.
Re: sscanf parameter -
Zeus666 - 21.10.2018
Thank you