28.05.2009, 10:23
I'm trying to make this kick a player when they connect with an InvalidName
This is what i have:
But I get this error and warning:
line 2586 is
and line 42345 isn't even in my script, the last line in my script is 42344
This is what i have:
pawn Код:
new InvalidNames[] =
{
"Britney_Spears",
"Mr_Bean",
"Fuck_Admins"
};
pawn Код:
public OnPlayerConnect(playerid)
{
new plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
for(new a = 0; a < sizeof(InvalidNames); a++)
{
if(strfind(plname, a, true) == -1)
{
new string[256];
format(string, sizeof(string), "No. You are not '%s'", plname);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
Kick(playerid);
return 1;
}
}
}
pawn Код:
(2586) : error 035: argument type mismatch (argument 2)
(42345) : warning 203: symbol is never used: "InvalidNames"
pawn Код:
if(strfind(plname, a, true) == -1)