0.3d and Sscanf
#1

So, i can understand that sscanf doesn't work proper with 0.3d (https://sampforum.blast.hk/showthread.php?tid=282902)

I have this command, which used to work fine with 0.3c (using sscanf and zcmd):
pawn Код:
COMMAND:pm(playerid, params[])
{
    new pid;
    if(sscanf(params, "us[128]", pid, params[2])) return SendClientMessage(playerid, COLOR_SYSTEMRED, "USAGE: /pm <playerid> <message>");
    if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, COLOR_NORMALRED, "( ! ) This player is not connected");
    if(pid == playerid) return SendClientMessage(playerid, COLOR_NORMALRED, "( ! ) You can not send private messages to yourself");
    if(gPlayerLogged[pid] == 0) return SendClientMessage(playerid, COLOR_NORMALRED, "( ! ) This player is not logged in");
    new sender[MAX_PLAYER_NAME], receiver[MAX_PLAYER_NAME], string[129];
    GetPlayerName(playerid, sender, sizeof(sender));
    GetPlayerName(pid, receiver, sizeof(receiver));
    format(string, sizeof(string), "PM from %s (ID:%i): %s", sender, playerid, params[2]);
    SendClientMessage(pid, COLOR_YELLOW, string);
    PlayerPlaySound(pid, 1085, 0, 0, 0);
    format(string, sizeof(string), "PM sent to %s (ID:%i): %s", receiver, pid, params[2]);
    SendClientMessage(playerid, COLOR_YELLOW, string);
    PlayerPlaySound(playerid, 1085, 0, 0, 0);
    return 1;
}
Now it just says "This player is not connected" no matter what id is typed.
As mentioned before; this command worked fine with 0.3c.
Is there any way to fix it, or do i have to wait for a new version of sscanf?

Thank you.
Reply
#2

I've heard that sscanf doesn't work on 0.3d yet.
Reply
#3

Quote:
Originally Posted by TheArcher
Посмотреть сообщение
I've heard that sscanf doesn't work on 0.3d yet.
Yes, its mentioned in the link i provided.
But my question is, can this be fixed by myself now, or do i have to wait for a new version of sscanf?
Reply
#4

http://forum.sa-mp.com/showpost.php?...postcount=1476
Reply
#5

^^ Hmm, thanks. This will work
But i think that i will just wait for a new version of sscanf
Reply
#6

sscanf doesn't work on few commands on my script like: /car find <id>
Reply
#7

Why would you bump this topic? Also, its most likely that the issue is the way you use sscanf, not sscanf itself.
Reply
#8

sscanf is currently working just fine on 0.3d - I haven't had any issues.
Reply
#9

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
sscanf is currently working just fine on 0.3d - I haven't had any issues.
I know. ****** made a new version.
This threat is like one mounth old, and at that time sscanf didnt work with 0.3d...
Reply
#10

Quote:
Originally Posted by sim_sima
Посмотреть сообщение
I know. ****** made a new version.
This threat is like one mounth old, and at that time sscanf didnt work with 0.3d...
Oh, gotcha'. Someone bumped it before I posted.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)