if(listitem == 0)
{
new gName[MAX_PLAYER_NAME],string[128];
GetPlayerName(pClicked[playerid],gName,sizeof gName);
format(string, sizeof(string), "Admin %s has kicked %s through the admin access panel.", RemoveUnderScore(playerid), RemoveUnderScore(gName));
SendClientMessageToAll(RED, string);
SaveStats(pClicked[playerid]);
Kick(pClicked[playerid]);
}
test.pwn(8759) : error 035: argument type mismatch (argument 1) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
You can only pass 1 type of variable to a function. In the first RemoveUnderscore-function you pass the playerid (integer) and in the second you pass the playername (string).
Fix that. |
format(string, sizeof(string), "Admin %s has kicked %s through the admin access panel.", RemoveUnderScore(playerid), RemoveUnderScore(gName));
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
if(listitem == 0)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
new gName[MAX_PLAYER_NAME],string[128];
GetPlayerName(pClicked[playerid],gName,sizeof gName);
format(string, sizeof(string), "Admin %s has kicked %s through the admin access panel.", RemoveUnderScore(pName), RemoveUnderScore(gName));
SendClientMessageToAll(RED, string);
SaveStats(pClicked[playerid]);
Kick(gName[playerid]);
}
test.pwn(8757) : warning 219: local variable "pName" shadows a variable at a preceding level test.pwn(8761) : error 035: argument type mismatch (argument 1) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. ================ READY ================
if(listitem == 0)
{
new string[128];
format(string, sizeof(string), "Admin %s has kicked %s through the admin access panel.", RemoveUnderScore(playerid), RemoveUnderScore(pClicked[playerid]));
SendClientMessageToAll(RED, string);
SaveStats(pClicked[playerid]);
Kick(pClicked[playerid]);
}