Enum y_ini problem
#1

Hey,
I have changed my Admin System but now I cannot make admin commands anymore..
It shows a bunch of errors on if(pInfo[playerid][pAdmin] >= 2) { line of code..
Here's freeze command..
Errors are following:
pawn Код:
E:\server 3e\pawno\gm232323.pwn(404) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
E:\server 3e\pawno\gm232323.pwn(404) : warning 215: expression has no effect
E:\server 3e\pawno\gm232323.pwn(404) : error 001: expected token: ";", but found "]"
E:\server 3e\pawno\gm232323.pwn(404) : error 029: invalid expression, assumed zero
E:\server 3e\pawno\gm232323.pwn(404) : fatal error 107: too many error messages on one line
PHP код:
CMD:freeze(playeridparams[])
    {
        if(
pInfo[playerid][pAdmin] >= 2) {
            new 
PID;
            new 
reason[64];
            new 
str[128];
            new 
Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];
            
GetPlayerName(playeridAdminnamesizeof(Adminname));
               
GetPlayerName(PIDPlayernamesizeof(Playername));
            if(
sscanf(params"us[64]"PID,reason)) return SendClientMessage(playeridCOLOR_RED"[AdminInfo] USAGE: /freeze [id] [reason]");
            if(!
IsPlayerConnected(PID))
            return 
SendClientMessage(playeridCOLOR_GREY"Player is not connected!");
            
format(strsizeof(str),"[AdminInfo] '%s' has been frozen by Administrator '%s'. Reason: %s "PlayernameAdminnamereason); 
            
SendClientMessageToAll(COLOR_REDstr);
              
TogglePlayerControllable(PID,0);
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"You have to Be Admin Level 2 to use that command!");
        }
        return 
1;
    } 
Reply
#2

Might wanna show us your Enum?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)