error 035: argument type mismatch (argument 2)
#1

Code:
stock BanPlayer(playerid, Admin, const reason[])
{
     new
       string[150],
       Month,
       Day,
       Year,
       name[MAX_PLAYER_NAME],
       adminname[MAX_PLAYER_NAME],
       File:banlog;
     getdate(Year, Month, Day);
     GetPlayerName(playerid, name, MAX_PLAYER_NAME);
     GetPlayerName(Admin, adminname, MAX_PLAYER_NAME);
     format(string, sizeof(string), "%s banned by %s[Reason: %s\r][Date: %d/%d/%d]\n", name, adminname, reason, Day, Month, Year);
     banlog = fopen("BanLog.txt", io_append);
     fwrite(banlog, string);
     fclose(banlog);
     PlayerInfo[playerid][pBanned] = 1;
     return Kick(playerid);
}
Line:
Code:
if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
		{
			new Admin[24] = "Anti-cheat";
			new bannednamejetpack[MAX_PLAYER_NAME], jetpackbanstring[300 + MAX_PLAYER_NAME];
    		GetPlayerName(i, bannednamejetpack, sizeof(bannednamejetpack));
    		format(jetpackbanstring, sizeof(jetpackbanstring), "Anti-cheat: %s has been banned from the server {FFFFFF}[Reason: Jetpack hack]", bannednamejetpack);
    		SendClientMessageToAll(COR_VERMELHO, jetpackbanstring);
    		BanPlayer(i,Admin,reason3);
		}
Help please :/
Reply
#2

----
Reply
#3

If you think you deserve help (which i think u do not), do something for it, like marking the problematic lines ...

and what skuller said is bullshit
Reply
#4

stock BanPlayer(playerid, Admin[], const reason[])

PS: you can just do: BanPlayer(i,"AntiCheat", "Jetpack Hacks");
Reply
#5

Thanks iLearner
Reply
#6

Quote:
Originally Posted by TomRedlake
View Post
Thanks iLearner
Your function is still using Admin as an integer in it.

PHP Code:
GetPlayerName(AdminadminnameMAX_PLAYER_NAME); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)