Can someone tell me whats wrong here? 4 Errors.
#8

You missed a brace and there was a semi-colon right after the if statement which I removed. Should work now as it did right here.

pawn Код:
stock InvalidNameCheck(playerid)
{
    new arrForbiddenNames[][] = {
            "com1", "com2", "com3", "com4",
            "com5", "com6", "com7", "com8",
            "com9", "lpt4", "lpt5", "lpt6",
            "lpt7", "lpt8", "lpt9", "nul",
            "clock$", "aux", "prn", "con",
            "InvalidNick"
     };

    new i = 0;
    while(i < sizeof(arrForbiddenNames))
    { // you forgot this
        if(strcmp(arrForbiddenNames[i++], GetPlayerNameExt(playerid), true) == 0) // removed a ;
        {
            SetPlayerName(playerid, "InvalidNick");
            SendClientMessage(playerid, COLOR_RED, "You have been kicked & logged for using a forbidden username.");
            Kick(playerid);
            return 0;
        }
    } // added
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)