Error 035: argument type mismatch (argument 1)
#1

pawn Код:
#include <zcmd>
#include <sscanf2>

CMD:kick(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] > 0)
    {
      new Name[MAX_PLAYER_NAME], KickMessage[128];
      new Name2[MAX_PLAYER_NAME], id[128], reason[128];
      GetPlayerName(playerid, Name, sizeof(Name));
      GetPlayerName(id, Name2, sizeof(Name2)); // Line 188
      format(KickMessage, sizeof(KickMessage), "%s(%d) has kicked player %s(%d). Reason: %s", Name, playerid, Name2, id, reason);
      SendClientMessageToAll(COL_WHITE, KickMessage);
      Kick(id); // Line 191
    }
    return 1;
}
pawn Код:
C:\Users\Admin\Desktop\SA-MP\gamemodes\prison.pwn(188) : error 035: argument type mismatch (argument 1)
C:\Users\Admin\Desktop\SA-MP\gamemodes\prison.pwn(191) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Reply
#2

remove [128] (id[128])
Reply
#3

Quote:
Originally Posted by Mr_DjolE
Посмотреть сообщение
remove [128] (id[128])
So this line:
new Name2[MAX_PLAYER_NAME], id[128], reason[128];
would be:
new Name2[MAX_PLAYER_NAME], id, reason[128];
That should fix your problem, indeed.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)