Sscanf
#1

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

pawn Код:
if(sscanf(params, "is[64]", id, reason)) return SendClientMessage(playerid, COLOR_MEDIUMRED, "Message...");
Reply
#3

You have to use "s[size_here]" for strings.
pawn Код:
if(sscanf(params, "is[63]", id, reason)) return SendClientMessage(playerid, COLOR_MEDIUMRED, "Message...");
Reply
#4

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

Mmmmmm. Can anyone help me?
Reply
#6

pawn Код:
if(sscanf(params, "iS(No reason)[128]", id, reason)) return SendClientMessage(playerid, COLOR_MEDIUMRED, "Message...");
Quote:

S(string)[length] //Optional string

Reply
#7

Thanks for your help guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)