error 35: Argument Type Mismatch (argument 2) Forbidden Name System - 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 35: Argument Type Mismatch (argument 2) Forbidden Name System (
/showthread.php?tid=544422)
error 35: Argument Type Mismatch (argument 2) Forbidden Name System -
Stoyanov - 01.11.2014
Код:
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))
Re: error 35: Argument Type Mismatch (argument 2) Forbidden Name System -
blackeagle1122 - 01.11.2014
Try this:
pawn Код:
if(!strcmp(name, ForbiddenNames[i][0], true))
Re: error 35: Argument Type Mismatch (argument 2) Forbidden Name System -
Stoyanov - 01.11.2014
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 : )