error 035: 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)
+--- Thread: error 035: argument type mismatch (argument 2) (
/showthread.php?tid=637850)
error 035: argument type mismatch (argument 2) -
TomRedlake - 22.07.2017
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 :/
Re: error 035: argument type mismatch (argument 2) -
skuller12 - 22.07.2017
----
Re: error 035: argument type mismatch (argument 2) -
BiosMarcel - 22.07.2017
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
Re: error 035: argument type mismatch (argument 2) -
iLearner - 22.07.2017
stock BanPlayer(playerid, Admin
[], const reason[])
PS: you can just do: BanPlayer(i,"AntiCheat", "Jetpack Hacks");
Re: error 035: argument type mismatch (argument 2) -
TomRedlake - 22.07.2017
Thanks iLearner
Re: error 035: argument type mismatch (argument 2) -
Paulice - 22.07.2017
Quote:
Originally Posted by TomRedlake
Thanks iLearner
|
Your function is still using Admin as an integer in it.
PHP Code:
GetPlayerName(Admin, adminname, MAX_PLAYER_NAME);