SA-MP Forums Archive
sscanf isnt returning correct message - 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 isnt returning correct message (/showthread.php?tid=554006)



[SOLVED]sscanf isnt returning correct message[SOLVED] - Tom1412 - 01.01.2015

Hello,

When I am writing the script, it should return a message "[Server] Usage: /ban [playerid] [reason]"

but what I am getting is (in the image below)



Any ideas?

pawn Код:
new id,reason[55];
if(sscanf(params, "UD[55]", id,reason)) return SendClientMessage(playerid, -1, "USAGE: /ban [playerid] [reason]");



Re: sscanf isnt returning correct message - DavidBilla - 01.01.2015

Replace 'D' with 'S'


AW: sscanf isnt returning correct message - Sascha - 01.01.2015

shouldn't it be
pawn Код:
if(sscanf(params, "us[55]", id,reason))
?


edit: too late...


Re: sscanf isnt returning correct message - Tom1412 - 01.01.2015

THanks guys it is working, got it working with s and it needs to be lower. never saw that happen befor,


Re: sscanf isnt returning correct message - rickisme - 01.01.2015

d = decimal
s = string

https://github.com/Y-Less/sscanf/wiki