Problem with sscanf - 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: Problem with sscanf (
/showthread.php?tid=659074)
Problem with sscanf -
2Col - 22.09.2018
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:
But it should be:
However, if players switch their IDs everything is fine.
Code:
0) Y_Less
1) [CLAN]Y_Less
/test [CLAN]
Any ideas?
EDIT:
v2.8.3 fixed this issue, but I have another issue.
There is 1 player:
and if I enter this:
Code:
/test [CLAN]Y_LessSomething
I get this:
Re: Problem with sscanf -
KinderClans - 24.09.2018
Use "r". I had this bug too and i fixed with that.
Re: Problem with sscanf -
2Col - 24.09.2018
Quote:
Originally Posted by KinderClans
Use "r". I had this bug too and i fixed with that.
|
Nope, didn't work for me.
Re: Problem with sscanf -
2Col - 16.10.2018
v2.8.3 fixed this issue, but I have another issue.
There is 1 player:
and if I enter this:
Code:
/test [CLAN]Y_LessSomething
I get this:
Re: Problem with sscanf -
2Col - 18.10.2018
Bump.
Re: Problem with sscanf -
khRamin78 - 18.10.2018
Quote:
Originally Posted by 2Col
v2.8.3 fixed this issue, but I have another issue.
There is 1 player:
and if I enter this:
Code:
/test [CLAN]Y_LessSomething
I get this:
|
i think cus you are just checking first 3x characters so that should return true
Re: Problem with sscanf -
2Col - 19.10.2018
Quote:
Originally Posted by khRamin78
i think cus you are just checking first 3x characters so that should return true
|
I don't think so.
If I enter this:
Everything is fine, I get this:
Code:
No matching players found.