sscanf parameter
#1

if(sscanf(params, "us[105]",reason)) return SendClientMessage(playerid,-1,""chat" /(re)port [Reason]");


what should I write instead of US105?
Reply
#2

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
Reply
#3

[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.
Reply
#4

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

Thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)