error 014: invalid statement; not in switch
#2

pawn Код:
if(dialogid == DIALOG_CLICK) // this line coming up as the error
    {
            if(!response) return SCM(playerid,-1,"Dialog is closed");
            new
            text[128];
            switch(listitem)
            {
                case 0:
                {
                    Kick(GetPVarInt(playerid,"pplayerid"));
                    SetPVarInt(playerid,"pplayerid",999);
                    format(text,sizeof(text),"Admin %s is kick you from server!",GetName(playerid));
                    SCM(GetPVarInt(playerid,"pplayerid"),-1,text);
                }
                case 1:
                {
                    Ban(GetPVarInt(playerid,"pplayerid"));
                    SetPVarInt(playerid,"pplayerid",999);
                    format(text,sizeof(text),"Admin %s is ban you from server!",GetName(playerid));
                    SCM(GetPVarInt(playerid,"pplayerid"),-1,text);
                }
                case 2:
                {
                    ShowPlayerDialog(playerid,DIALOG_ADMIN,DIALOG_STYLE_INPUT,"Admin Control Panel","Type admin level [1-5]","Make","Лxit");
                }
            }
        }
Why you put case?
Or put case DIALOG_CLICK in a switch.
Reply


Messages In This Thread
error 014: invalid statement; not in switch - by Yves - 05.09.2013, 22:19
Re: error 014: invalid statement; not in switch - by WopsS - 05.09.2013, 22:22
Re: error 014: invalid statement; not in switch - by Yves - 05.09.2013, 22:28
Re: error 014: invalid statement; not in switch - by WopsS - 05.09.2013, 22:30

Forum Jump:


Users browsing this thread: 1 Guest(s)