Need help with 4errors
#1

Hello,
I'm getting these errors
Код:
(2439) : error 003: declaration of a local variable must appear in a compound block
(2439) : warning 217: loose indentation
(2439) : error 017: undefined symbol "string"
(2439) : warning 215: expression has no effect
(2439) : error 001: expected token: ";", but found "]"
(2439) : fatal error 107: too many error messages on one line
this is the command I'm making
pawn Код:
CMD:a(playerid, params[])
{
    if(Player[playerid][pAdminLevel] >= 1)
    {
        if(!isnull(params))
       
            new string[128];//This is the errors line 2439

            if(Player[playerid][pAdminLevel] == 1) format(string, sizeof(string), "[Admin Chat] {kleur}Retired Admin{FFFFFF} %s: %s", GetName(playerid, params);
            else if(Player[playerid][pAdminLevel] == 2) format(string, sizeof(string), "[Admin Chat] {kleur}Junior Admin{FFFFFF} %s: %s", GetName(playerid, params);
            else if(Player[playerid][pAdminLevel] == 3) format(string, sizeof(string), "[Admin Chat] {kleur}General Admin{FFFFFF} %s: %s", GetName(playerid, params);
            else if(Player[playerid][pAdminLevel] == 4) format(string, sizeof(string), "[Admin Chat] {kleur}Senior Admin{FFFFFF} %s: %s", GetName(playerid, params);
            else if(Player[playerid][pAdminLevel] == 5) format(string, sizeof(string), "[Admin Chat] {kleur}Head Admin{FFFFFF} %s: %s", GetName(playerid, params);
            else if(Player[playerid][pAdminLevel] == 6) format(string, sizeof(string), "[Admin Chat] {kleur}Server Owner{FFFFFF} %s: %s", GetName(playerid, params);

            return SendClientMessage(playerid, -1, "Syntax: /a(dmin) [text]");
        }
        SendToAdmins(0xF2FF00FF, string);
    }
    return 1;
}
Reply


Messages In This Thread
Need help with 4errors - by McFellow - 09.02.2013, 16:12
Re: Need help with 4errors - by Angel.Why - 09.02.2013, 16:18
Re: Need help with 4errors - by McFellow - 09.02.2013, 16:22
Re: Need help with 4errors - by DiGiTaL_AnGeL - 09.02.2013, 16:22
Re: Need help with 4errors - by LarzI - 09.02.2013, 16:26
Re: Need help with 4errors - by McFellow - 09.02.2013, 16:26
Re: Need help with 4errors - by Angel.Why - 09.02.2013, 16:27
Re: Need help with 4errors - by LarzI - 09.02.2013, 16:29
Re: Need help with 4errors - by McFellow - 09.02.2013, 16:31
Re: Need help with 4errors - by McFellow - 09.02.2013, 16:33

Forum Jump:


Users browsing this thread: 4 Guest(s)