Undefined symbol "pFrozen" PLEASE HELP
#1

I defined pFrozen in my enums which you can see below


Код:
enum pInfo
{
    pPass,
    pCash,
    pAdmin,
    pSex,
    pAge,
   	Float:pPos_x,
	Float:pPos_y,
	Float:pPos_z,
	pSkin,
	pTeam,
	pAccent
	pFrozen
}
He is my /freeze command


Код:
CMD:freeze(playerid,params[])
{
    if(PlayerData[ID][AdminLevel] >= 1)
    {
            new Target; //defines the playerid we wanna freeze
            if(sscanf(params, "u", Target)) SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /freeze [playerid]"); //tell sscanf again if the parameters/syntax is wrong to return a special message
            if(!IsPlayerConnected(Target)) //if the ID doesn't exist, return an error-message
                return SendClientMessage(playerid, COLOR_GREY, "ERROR:Player is not connected!");
            if(!sscanf(params, "u", Target))
            {
                if(PlayerInfo[Target][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid,red,"ERROR: You cant perform this on Admins that are higher than your level!"); // if the player you're performing this command on has a higher level as you, return a message, you ain't able to freeze him
                new tname[MAX_PLAYER_NAME]; //define the new target-name of the playerid
                GetPlayerName(Target,tname,sizeof(tname)); //get the playername with this function
                new pname[MAX_PLAYER_NAME]; //define the adminname
                GetPlayerName(playerid,pname,sizeof(pname)); //get the adminname with this function
                new tstring[128]; //define the string for the player (victim)
                new pstring[128];// define the string for the admin which is performing
                new astring[128];//define the string for all the players which are online
                format(tstring,sizeof(tstring),"You have been frozen by administrator %s! You cant move!",pname); //this is formatting the player-string, while it's also getting the adminname
                format(pstring,sizeof(pstring),"You have frozen player %s(%d)!",tname,Target); //this is formatting the adminname-string, while it's also getting the playername and his ID(target)
                format(astring,sizeof(astring),"Administrator %s has frozen %s!",pname,tname); //this is formatting the all-string, while it's sending this message to everybody and is getting admin- and playername
                SendClientMessage(Target,COLOR_GOLD,tstring);//sends the message to the victim
                SendClientMessage(playerid,TEAM_GROVE_COLOR,pstring);//sends the message to the admin
                SendClientMessageToAll(COLOR_LIGHTBLUE,astring);//sends the message to everybody
                TogglePlayerControllable(Target,0); //with that function, the player won't be able to mov, while we're using the variable "Target" as the playerid
                PlayerInfo[Target][pFrozen] = 1;//IMPORTANT:we're getting the variable "[frozen]" out of the enum, and set it's value to "1', the compiler knows now that the player is frozen
            }

    }
It says on the error


Код:
(973) : error 017: undefined symbol "pFrozen"
Please Help Me
Reply
#2

Add a comma after pAccent.
Reply
#3

pawn Код:
enum pInfo
{
    pPass,
    pCash,
    pAdmin,
    pSex,
    pAge,
    Float:pPos_x,
    Float:pPos_y,
    Float:pPos_z,
    pSkin,
    pTeam,
    pAccent,
    pFrozen
}
you where missing a comma after pAccent
Reply
#4

pawn Код:
enum pInfo
{
    pPass,
    pCash,
    pAdmin,
    pSex,
    pAge,
    Float:pPos_x,
    Float:pPos_y,
    Float:pPos_z,
    pSkin,
    pTeam,
    pAccent,
    pFrozen
};
new PlayerInfo[MAX_PLAYERS][pInfo];
Reply
#5

Thank You Every One
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)