SA-MP Forums Archive
SSCANF Issue - 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 Issue (/showthread.php?tid=342540)



SSCANF Issue - Deduction - 14.05.2012

Hey,
Im using a script which uses the plugin SSCANF
Its using Update 10 which is the recent one.

I am using 0.3e server and client and I put in the following and when I put in /test then any number it returns as 4.
pawn Code:
CMD:test(playerid, params[])
{

                new string[128], wid;
                if(sscanf(params, "d", wid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /test [number]");
                format(string, sizeof(string), "You put in %d", wid);
                SendClientMessageEx(playerid, COLOR_YELLOW, string);
                                return 1;
   
}
Do you know what is happening?


Re: SSCANF Issue - James Coral - 14.05.2012

Yes i know, dude can you show us the console text, there comes always the errors?


Re: SSCANF Issue - Deduction - 14.05.2012

No errors are being printed on console.
Im using ZCMD, and I thought that may need to be updated but it appears to have no errors.
Here are all the PAWN Includes
pawn Code:
#include <a_samp>
#include <streamer>
#include <a_zones>
#include <foreach>
#include <yom_buttons>
#include <djson>
#include <progress>
#include <YSI\y_timers>
#include <zcmd>
#include <sscanf2>
And the Include files are sscanf and streamer


Re: SSCANF Issue - iRage - 14.05.2012

I've re-written it, the only difference I can notice is me using i instead of d which totally makes no sense if it's the problem, try it anyways 'n tell me the results you get.

pawn Code:
CMD:test(playerid, params[])
{
    new string[128], wid;
    if(sscanf(params, "i", wid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /test [number]");
    format(string, sizeof(string), "You put in %d", wid);
    SendClientMessageEx(playerid, COLOR_YELLOW, string);
    return 1;
}



Re: SSCANF Issue - Deduction - 14.05.2012

It just says You put in 4


Re: SSCANF Issue - Deduction - 14.05.2012

Any help? Please, I'll give whoever can help +REP


Re: SSCANF Issue - Ash. - 14.05.2012

Try putting the sscanf include after the a_samp include. I had some odd problems like this a long time ago, and this is how I sorted it.


Re: SSCANF Issue - ViniBorn - 14.05.2012

Download this and try ...


Re: SSCANF Issue - Deduction - 14.05.2012

Nope, neither of the above help.