ZCMD sscanf params - 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: ZCMD sscanf params (
/showthread.php?tid=371587)
ZCMD sscanf params -
SumX - 23.08.2012
Hello!
I am using ZCMD + sscanf to create commands.When I am using some commands ,I see in the console a sscanf warning: Format specifier does not match parameter count.
Should I use #pragma unused params? I have no complier errors and the commands are working perfect,but I get this console warning.
Thank you!
Re: ZCMD sscanf params -
Shetch - 23.08.2012
sscanf sends you that warning because you have more parameters than specifiers.
Here, I'll show you an example:
Код:
new number, number2;
if(sscanf(params, "i", number)) // Has a single specifier and a single parameter. (Correct)
if(sscanf(params, "i", number, number2)) // Has a single specifier and two parameters. (Incorrect)
The incorrect one would send warnings in the console, just like it did for you.