error 35: Argument Type Mismatch (argument 2) Forbidden Name System
#1

Код:
new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    for(new i = 0; i < sizeof(ForbiddenNames); i++)
	{
	if(!strcmp(name, i, true))
	{
	SendClientMessage(playerid, 0xFF0000FF, "SERVER: That name is not allowed here!");
	SendClientMessage(playerid, 0xFF0000FF, "SERVER: You have kicked");
	Kick(playerid);
	}
}
I'm getting a error on this line:

Код:
if(!strcmp(name, i, true))
Reply
#2

Try this:
pawn Код:
if(!strcmp(name, ForbiddenNames[i][0], true))
Reply
#3

Now its working, but when i try to log in with one of the forbidden names it shows me Lost connection. Retrying to connect 4-5 times then kicks me out.

Edit: It's from "for" looping it's normal. : ) Thanks for helping : )
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)