What's wrong with this?
#1

Код:
CMD:kick(playerid, params[])
{
    new
        string[128],
        giveplayerid,
        adminname[MAX_PLAYER_NAME],
        playername[MAX_PLAYER_NAME],
        reason[50];
    if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COL_GREY, "You are not authorized for that command!");
    else if(sscanf(params, "rs[50]", giveplayerid, reason)) return SendClientMessage(playerid, COL_GREY, "[SYNTAX]: /kick [ID/PartOfName] [10.chars.max] [50.chars.max]");
    else if(!IsPlayerConnected(giveplayerid) || giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COL_GREY, "Invalid playerid!");
    else {
        format(string, sizeof(string), "SERVER: %s have been kicked by %s, reason: %s.", playername, adminname, reason);
        SendClientMessageToAll(COL_RED, string);
        Kick(giveplayerid);
    }
    return 1;
}
With that code I get this error?
Код:
C:\Users\admin\Desktop\Server\gamemodes\Server.pwn(744) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Line 744 is
Код:
        SendClientMessageToAll(COL_RED, string);
Reply


Messages In This Thread
What's wrong with this? - by Vic1990 - 26.11.2011, 12:13
Re: What's wrong with this? - by Calgon - 26.11.2011, 12:17
Re: What's wrong with this? - by Vic1990 - 26.11.2011, 12:18
Re: What's wrong with this? - by Rob_Maate - 26.11.2011, 12:21
Re: What's wrong with this? - by Calgon - 26.11.2011, 12:21
Re: What's wrong with this? - by Vic1990 - 26.11.2011, 12:24

Forum Jump:


Users browsing this thread: 1 Guest(s)