Ban command help
#1

Hello, I'm trying to make a ban command using a tutorial on the sa-mp forums although, somewhy, I get these following errors.

pawn Код:
C:\Users\vasu\Desktop\Sa-Mp Roleplay Serv\gamemodes\Roleplay.pwn(866) : error 017: undefined symbol "SInfo"
C:\Users\vasu\Desktop\Sa-Mp Roleplay Serv\gamemodes\Roleplay.pwn(866) : warning 215: expression has no effect
C:\Users\vasu\Desktop\Sa-Mp Roleplay Serv\gamemodes\Roleplay.pwn(866) : error 001: expected token: ";", but found "]"
C:\Users\vasu\Desktop\Sa-Mp Roleplay Serv\gamemodes\Roleplay.pwn(866) : error 029: invalid expression, assumed zero
C:\Users\vasu\Desktop\Sa-Mp Roleplay Serv\gamemodes\Roleplay.pwn(866) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
The script for the command is the following.

pawn Код:
CMD:ban(playerid,params[])
{
    if(PlayerInfo[playerid][Level] < 1) return SendClientMessage(playerid, COLOR_GREY, "You can't use this command!");//Checking if the player has admin level 1, if not it sends him a message.
    {
        new id, r[25], string[100];//R = Reason
        new name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME];
        if(sscanf(params, "is", id, r)) return SendClientMessage(playerid, 0xF69521AA, "USAGE: /ban [id] [reason]");
        {
            if(id != INVALID_PLAYER_ID)
            {
                PlayerInfo[id][Banned]=1;//To Make Player Banned When He Connect It Kick Him
                GetPlayerName(playerid, name, sizeof(name));
                GetPlayerName(id, name2, sizeof(name2));
                format(string, sizeof(string), "%s[%d] has been banned by Admin %s[%d] - %s", id, name2, playerid, name, r);
                else
                if(PlayerInfo[playerid][Level] < 1) format(string, sizeof(string), ""%s[%d] has been banned by Moderator %s[%d] - %s", id, name2, playerid, name, r);
                SendClientMessageToAll(0xFF1493FF, string);
                Kick(ID);
            }
            else SendClientMessage(playerid, COLOR_GREY, "
The specified player is currently not connected.");
        }
    }
    else SendClientMessage(playerid, COLOR_GREY, "
You can't use this command!");
P.S: Ignore the warning please, as I'm aware of it.
Reply


Messages In This Thread
Ban command help - by Vasu99 - 01.03.2014, 21:09
Re: Ban command help - by Abagail - 01.03.2014, 21:10
Re: Ban command help - by park4bmx - 01.03.2014, 21:11
Re: Ban command help - by Vasu99 - 01.03.2014, 21:23
Re: Ban command help - by park4bmx - 01.03.2014, 21:33
Re: Ban command help - by Vanter - 01.03.2014, 21:50
Re: Ban command help - by Vasu99 - 01.03.2014, 22:08
Re: Ban command help - by Kar - 01.03.2014, 22:47
Re: Ban command help - by EquipeBMR - 01.03.2014, 23:10
Re: Ban command help - by Vasu99 - 01.03.2014, 23:12

Forum Jump:


Users browsing this thread: 1 Guest(s)