SA-MP Forums Archive
Error 035: argument type mismatch (argument 1) - 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: Error 035: argument type mismatch (argument 1) (/showthread.php?tid=408359)



Error 035: argument type mismatch (argument 1) - Noles2197 - 17.01.2013

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.



Re: Error 035: argument type mismatch (argument 1) - Djole1337 - 17.01.2013

remove [128] (id[128])


Re: Error 035: argument type mismatch (argument 1) - Kwarde - 18.01.2013

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.