Problem with sscanf
#1

I took an example code from sscanf thread:
Code:
#include <a_samp>
#include <Pawn.CMD>
#include <sscanf2>

main()
{

}

cmd:test(playerid, params[])
{
	new ids[3], i;
	if (sscanf(params, "?<MATCH_NAME_PARTIAL=1>u[3]", ids)) printf("Error in input");
	for (i = 0; ids[i] != INVALID_PLAYER_ID; ++i)
	{
	    if (ids[i] == cellmin)
	    {
	        printf("Too many matches");
	        break;
	    }
	    printf("id = %d", ids[i]);
	}
	if (i == 0) printf("No matching players found.");
	return 1;
}
There are 2 players:
Code:
0) [CLAN]Y_Less
1) Y_Less
When I write /test [CLAN] I get this:
Code:
id = 0
id = 1
But it should be:
Code:
id = 0
However, if players switch their IDs everything is fine.
Code:
0) Y_Less
1) [CLAN]Y_Less
/test [CLAN]
Code:
id = 1
Any ideas?

EDIT:

v2.8.3 fixed this issue, but I have another issue.

There is 1 player:
Code:
0) [CLAN]Y_Less
and if I enter this:
Code:
/test [CLAN]Y_LessSomething
I get this:
Code:
id = 0
Reply


Messages In This Thread
Problem with sscanf - by 2Col - 22.09.2018, 17:58
Re: Problem with sscanf - by KinderClans - 24.09.2018, 09:13
Re: Problem with sscanf - by 2Col - 24.09.2018, 09:36
Re: Problem with sscanf - by 2Col - 16.10.2018, 14:32
Re: Problem with sscanf - by 2Col - 18.10.2018, 14:46
Re: Problem with sscanf - by khRamin78 - 18.10.2018, 17:00
Re: Problem with sscanf - by 2Col - 19.10.2018, 16:03

Forum Jump:


Users browsing this thread: 1 Guest(s)