How to remove These errors?? (rep+)
#1

pawn Код:
dcmd_offduty(playerid, params[]){
{
    if(PlayerInfo[playerid][Level] >= 2)
    {
        CMDMessageToAdmins(playerid,"Now Off Duty");   GetPlayerName(playerid, adminname, sizeof(adminname));
        for(new i = 0; i <= MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) == 1)
            {
                ResetPlayerWeapons(playerid);
                ForceClassSelection(playerid);
                SetPlayerHealth(playerid,0);
                format(string,256,"Administrator %s Has End With His Admin Duty",adminname);
                SendClientMessage(i,pink,string);
            }
        }
    }
    else
    {
        SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");   }
        return 1;
    }
    return true;
}


dcmd_onduty(playerid, params[])
{
    if(PlayerInfo[playerid][Level] >= 2)
    {
        CMDMessageToAdmins(playerid,"Now On Duty");   GetPlayerName(playerid, adminname, sizeof(adminname));
        for(new i = 0; i <= MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) == 1)
            {
                SetPlayerSkin(playerid,217); GivePlayerWeapon(playerid,38,500000); SetPlayerHealth(playerid,100000); SetPlayerColor(playerid,pink); format(string,256,"Administrator %s Has Now On Admin Duty",adminname);  SendClientMessage(i,pink,string);   }
            }
        }
        else
        {
            SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");   }
            return 1;
        }
    }
    return true;

}
=> I used this...
And i am getting These Errors:
pawn Код:
D:\Game\SA-MP Files\UnderWars\filterscripts\LuxAdmin.pwn(7141) : error 017: undefined symbol "PlayerInfo"
D:\Game\SA-MP Files\UnderWars\filterscripts\LuxAdmin.pwn(7141) : warning 215: expression has no effect
D:\Game\SA-MP Files\UnderWars\filterscripts\LuxAdmin.pwn(7141) : error 001: expected token: ";", but found "]"
D:\Game\SA-MP Files\UnderWars\filterscripts\LuxAdmin.pwn(7141) : error 029: invalid expression, assumed zero
D:\Game\SA-MP Files\UnderWars\filterscripts\LuxAdmin.pwn(7141) : 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.
Reply
#2

post line 7141
Reply
#3

Why this error happens everytime someone convert it into dcmd?
Anyway, try adding this on the top of your script (not on the top below the defines):
pawn Код:
enum pInfo
{
    pAdmin
}

new
    PlayerInfo[ MAX_PLAYERS ][ pInfo ];
****** this and check out their problems they too had this error:
Код HTML:
site:forum.sa-mp.com "error 017: undefined symbol "PlayerInfo"" Lux Admin "dcmd"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)