SA-MP Forums Archive
Respect command problems!(sscanf error) - 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: Respect command problems!(sscanf error) (/showthread.php?tid=424967)



Respect command problems!(sscanf error) - Scrillex - 24.03.2013

pawn Код:
error 035: argument type mismatch (argument 1)

CMD:respect(playerid,params)
{
    new id;
    if(CanUseCmd[playerid] == true)
    {
        if(IsPlayerConnected(id))
        {
            [B]if(sscanf(params, "r", id)) return SendClientMessage(playerid, 0xCC0000AA, "USAGE: /respect <playerid/partofname>");//This line![/B]
            PlayerInfo[playerid][StreetRespect] ++;
            RestrictTime[playerid] = SetTimer("RestrictionOver", 3_600_000, false);
            CanUseCmd[playerid] = false;
        }
    }
    else return SendClientMessage(playerid, 0xCC0000AA, "You can't use this command yet, You can give only 1 Street point per 1 hour!");
    return 1;
}



Re: Respect command problems!(sscanf error) - dusk - 24.03.2013

Change "r" to "d"


Re: Respect command problems!(sscanf error) - Scrillex - 24.03.2013

Still same error! I don't get it where is the prob in it..


Re: Respect command problems!(sscanf error) - HurtLocker - 24.03.2013

what error(s) do you get?


Re: Respect command problems!(sscanf error) - Scrillex - 24.03.2013

error 035: argument type mismatch (argument 1)

line:
if(sscanf(params, "r", id)) return SendClientMessage(playerid, 0xCC0000AA, "USAGE: /respect <playerid/partofname>");