Disable OOC - help!
#1

Hey guys I'm experiencing some warnings in my code. Could you help me?

pawn Код:
warning 213: tag mismatch
warning 213: tag mismatch
pawn Код:
new bool:OOCenable = true;
pawn Код:
CMD:oocstatus(playerid,params[])
{
    new string[128];
    if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid,COLOR_GREY,"[Error]: You're not authorized to use this command.");

    if(OOCenable == 0) - warning line #1
    {
        format(string, sizeof(string), "AmdCmd: %s has enabled the OOC chat.", GetName(playerid));
        SendClientMessageToAll(COLOR_LIGHTRED,string);
        OOCenable = true;
    }
    else if(OOCenable == 1) - warning line #2
    {
        format(string, sizeof(string), "AmdCmd: %s has disabled the OOC chat.", GetName(playerid));
        SendClientMessageToAll(COLOR_LIGHTRED,string);
        OOCenable = false;
    }
    return 1;
}
Reply
#2

Change
pawn Код:
OOCenable == 0
//to
!OOCenable
//or
OOCenable == false

//and

OOCenable == 1
//to
OOCenable
//or
OOCenable == true
Reply
#3

Thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)