small warning
#1

Small warning,

pawn Код:
CMD:fixpv(playerid, params[])
{
        if(aDuty[playerid] == 1)
        if(PlayerInfo[playerid][pAdmin] >= 2)
        {
        new targetid;
        if(sscanf(params, "ui", targetid)) return SendClientMessage(playerid, C_GREY, "USAGE: /fixpv [playerid]");
        if(!IsPlayerInAnyVehicle(targetid)) return SendClientMessage(playerid,C_RED,"SERVER: Player not in a vehicle.");
        RepairVehicle(GetPlayerVehicleID(targetid));
       
        SendClientMessage(targetid, C_LGREEN, "Your Vehicle has been fixed by Admin %s ", Name(playerid));// here comes a warn
        } else SendClientMessage(playerid,C_RED,"You are not authorized to use this command!");
        return 1;
}
Код:
D:\GTA SanAndreas\_Samp_\gamemodes\iBon_BF.pwn(3748) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#2

pawn Код:
CMD:fixpv(playerid, params[])
{
        if(aDuty[playerid] == 1)
        if(PlayerInfo[playerid][pAdmin] >= 2)
        {
        new targetid, string[128];
        if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, C_GREY, "USAGE: /fixpv [playerid]");
        if(!IsPlayerInAnyVehicle(targetid)) return SendClientMessage(playerid,C_RED,"SERVER: Player not in a vehicle.");
        RepairVehicle(GetPlayerVehicleID(targetid));
        format(string, sizeof(string), "Your Vehicle has been fixed by Admin %s ", Name(playerid));
        SendClientMessage(targetid, C_LGREEN, string);
        } else SendClientMessage(playerid,C_RED,"You are not authorized to use this command!");
        return 1;
}
Reply
#3

You don't need the "ui" all you need is the "u" because your only filling in the ID.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)