sscanf2 "u" modifier problem! plz help me
#1

Hello all,

I am using sscanf 2 and zcmd lib.

My problem is when im using the "u" modifier it gives me a high numeric int instead of a proper id.

Example:

Код:
COMMAND:giveuser(playerid, params[])
{
	new id;

    if (!sscanf(params, "u", id))
    {
        new string[128];
        format(string, 128, "%d", id);
        SendClientMessage(playerid, COLOR_WHITE, string);
        format(string, 128, "%s", id);
        SendClientMessage(playerid, COLOR_WHITE, string);
        return 1;
	}
	else
	{
       SendClientMessage(playerid, COLOR_WHITE, "USAGE: /giveuser [id]");
	}

	return 0;
}
when i send the command /giveuser 5 it returns 185 and the same when i send the command /giveuser sircumz.

it should return always id 5 because in my test server i am id 5 (i got 5 bots).

whats wrong! plz help me
Reply


Messages In This Thread
sscanf2 "u" modifier problem! plz help me - by sircumz - 10.01.2012, 11:37
Re: sscanf2 "u" modifier problem! plz help me - by T0pAz - 10.01.2012, 11:56
Re: sscanf2 "u" modifier problem! plz help me - by sircumz - 10.01.2012, 11:59
Re: sscanf2 "u" modifier problem! plz help me - by T0pAz - 10.01.2012, 12:07
Re: sscanf2 "u" modifier problem! plz help me - by sircumz - 10.01.2012, 12:10
Re: sscanf2 "u" modifier problem! plz help me - by TheArcher - 10.01.2012, 12:38
Re: sscanf2 "u" modifier problem! plz help me - by mitosking - 10.01.2012, 12:40
Re: sscanf2 "u" modifier problem! plz help me - by [Diablo] - 10.01.2012, 12:53
Re: sscanf2 "u" modifier problem! plz help me - by sircumz - 10.01.2012, 13:01
Re: sscanf2 "u" modifier problem! plz help me - by T0pAz - 10.01.2012, 13:05

Forum Jump:


Users browsing this thread: 2 Guest(s)