SA-MP Forums Archive
COMMAND 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: COMMAND ERROR (/showthread.php?tid=394943)



COMMAND ERROR - Windrush - 24.11.2012

pawn Код:
CMD:kick(playerid,params[])
{
    new id [MAX_PLAYER_NAME],id1 [MAX_PLAYER_NAME], message;
    if(PInfo[playerid][Level] >= L_Kick)
    {
        if(sscanf(params, "us",id,message)) return SendClientMessage(playerid, 0xFF0000FF, "[System] /kick [id] [reason]");
        SendClientMessageToAll(0xFF0000FF, "{FF0000}|- {FF0000}%s Has Been Kick By Administrator %s | Reason: %s {FF0000}-|", id, id1, message);
        Kick(id);
    }
    return 1;
}
pawn Код:
C:\Users\carlo\Desktop\SA-MP Server\trucking\filterscripts\admin.pwn(112) : warning 202: number of arguments does not match definition
C:\Users\carlo\Desktop\SA-MP Server\trucking\filterscripts\admin.pwn(112) : warning 202: number of arguments does not match definition
C:\Users\carlo\Desktop\SA-MP Server\trucking\filterscripts\admin.pwn(112) : warning 202: number of arguments does not match definition
C:\Users\carlo\Desktop\SA-MP Server\trucking\filterscripts\admin.pwn(113) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.



Re: COMMAND ERROR - ViniBorn - 24.11.2012

pawn Код:
CMD:kick(playerid,params[])
{
    if(PInfo[playerid][Level] >= L_Kick)
    {
        new id, message[64];
        if(sscanf(params, "us",id,message)) return SendClientMessage(playerid, 0xFF0000FF, "[System] /kick [id] [reason]");
       
        new VBName[MAX_PLAYER_NAME],VBName2[MAX_PLAYER_NAME],VBString[128];
        GetPlayerName(playerid, VBName, MAX_PLAYER_NAME);
        GetPlayerName(id, VBName2, MAX_PLAYER_NAME);
        format(VBString,128,"{FF0000}|- {FF0000}%s Has Been Kick By Administrator %s | Reason: %s {FF0000}-|", VBName2, VBName, message);
        SendClientMessageToAll(0xFF0000FF, VBString);
        Kick(id);
    }
    return 1;
}