fatal error 107: too many error messages on one line
#1

Here's the line which the error is on:
pawn Код:
if(PlayerInfo[playerid][pAdmin] < =99999) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");


Here's the whole actual command:
pawn Код:
CMD:purge(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < =99999) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
    new f;
    if(sscanf(params,"d",f)) return SendClientMessage(playerid, COLOR_GREY, "USAGE:/purge [FactionID]");
    if(f < 1 || f > 14 || f == 10) return SendClientMessage(playerid, COLOR_GREY, "Factions range from 1 to 14, 10 is invalid.");
    new st[30], str[128];
    switch(f)
    {
        case 1:
        {
            st = "LSPD";
        }
        case 2:
        {
            st = "FBI";
        }
        case 3:
        {
            st = "SFPD";
        }
        case 4:
        {
            st = "FDSA";
        }
        case 5:
        {
            st = "Judicial System";
        }
        case 6:
        {
            st = "Government";
        }
        case 7:
        {
            st = "SASD";
        }
        case 8:
        {
            st = "Hitman Agency";
        }
        case 9:
        {
            st = "SA News";
        }
        case 11:
        {
            st = "National Guard";
        }
        case 12:
        {
            st = "Tierra Robada";
        }
        case 13:
        {
            st = "NOOSE";
        }
        default:
        {
            return SendClientMessage(playerid, COLOR_GREY, "Invalid faction ID.");
        }
    }
    foreach(Player, i)
    {
        if(PlayerInfo[i][pMember] == f || PlayerInfo[i][pLeader] == f)
        {
            SendClientMessage(i, COLOR_RED, "You have been kicked out of your faction by an administrator.");
            PlayerInfo[i][pMember] = 0;
            PlayerInfo[i][pLeader] = 0;
        }
    }
    format(str, 128, "Online members in %s were purged by %s.", st, GetPlayerNameEx(playerid));
    ABroadCast(COLOR_RED, str, 2);
    format(str, 128, "%s was purged by %s.", st, GetPlayerNameEx(playerid));
    Log("logs/purges.log", str);
    return 1;
}
Reply
#2

show the errors. there can't be only the fatal error 107

From what I think might be the reason, try replacing the line with this
pawn Код:
if(PlayerInfo[playerid][pAdmin] <= 99999) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
Reply
#3

1- Show us errors.

But what from I've seen, I think what you did wrong was this:
pawn Код:
(PlayerInfo[playerid][pAdmin] < =99999)
It should be:
pawn Код:
(PlayerInfo[playerid][pAdmin] <= 99999)
The problem is in the <=, it should be all together, no space between the two.

Good luck!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)