SA-MP Forums Archive
Argument Type Mismatch (argument 2) - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Argument Type Mismatch (argument 2) (/showthread.php?tid=243170)



Argument Type Mismatch (argument 2) - grand.Theft.Otto - 21.03.2011

pawn Код:
new player1,playername;
        new tmp[256], tmp2[256], Index;        tmp = strtok(params,Index), tmp2 = strtok(params,Index);
            if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /cage [playerid] [reason]");
            GetPlayerName(player1,playername,sizeof(playername)); GetPlayerName(playerid,playername,sizeof(playername)); GetPlayerPos(playerid,X,Y,Z);
pawn Код:
C:\Documents and Settings\User\Desktop\Las Venturas True Crime\gamemodes\ladmin.pwn(9472) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\User\Desktop\Las Venturas True Crime\gamemodes\ladmin.pwn(9472) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\User\Desktop\Las Venturas True Crime\gamemodes\ladmin.pwn(9472) : error 035: argument type mismatch (argument 2)
HELP LOL


Re: Argument Type Mismatch (argument 2) - [NRP]Blade - 21.03.2011

Код:
GetPlayerName(playerid, player1, sizeof(player1));



Re: Argument Type Mismatch (argument 2) - grand.Theft.Otto - 21.03.2011

Doesn't work D:


Re: Argument Type Mismatch (argument 2) - Mikkel_Pedersen - 21.03.2011

You are trying to store their name in an integer. You would have to make 'playername' a string. Change the first line of the code you pasted to:
pawn Код:
new player1,playername[MAX_PLAYER_NAME];