05.09.2013, 22:19
i have an issue on this dialog below
dont look how its made the [ code ] makes it spas out.
Код:
error 014: invalid statement; not in switch
Код:
case 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");
}
}
}
Код:
C:\Users\Brandon\Desktop\gm\gamemodes\Untitled.pwn(1881) : error 014: invalid statement; not in switch C:\Users\Brandon\Desktop\gm\gamemodes\Untitled.pwn(1881) : warning 215: expression has no effect C:\Users\Brandon\Desktop\gm\gamemodes\Untitled.pwn(1881) : error 001: expected token: ";", but found ":" C:\Users\Brandon\Desktop\gm\gamemodes\Untitled.pwn(1881) : error 029: invalid expression, assumed zero C:\Users\Brandon\Desktop\gm\gamemodes\Untitled.pwn(1881) : fatal error 107: too many error messages on one line



thanks for your help