SSCANF Issue
#1

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?
Reply
#2

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

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

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;
}
Reply
#5

It just says You put in 4
Reply
#6

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

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

Download this and try ...
Reply
#9

Nope, neither of the above help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)