Why does this happen?
#1

Hi, I am currently making a GM from scratch, and found that when I put this

Код:
	case 1:ShowPlayerDialog(playerid, DIALOG_Sub, DIALOG_STYLE_LIST, "Sub Machine Guns", "$1000 - UZI\n$1000 - Tec-9\n$1500 - MP5", "Select", "Cancel");}
I get these errors:

Код:
C:\Users\Rachel\Desktop\Omega Army TDM\gamemodes\OmegaArmy.pwn(292) : error 014: invalid statement; not in switch
C:\Users\Rachel\Desktop\Omega Army TDM\gamemodes\OmegaArmy.pwn(292) : warning 215: expression has no effect
C:\Users\Rachel\Desktop\Omega Army TDM\gamemodes\OmegaArmy.pwn(292) : error 001: expected token: ";", but found ":"
C:\Users\Rachel\Desktop\Omega Army TDM\gamemodes\OmegaArmy.pwn(292) : error 029: invalid expression, assumed zero
C:\Users\Rachel\Desktop\Omega Army TDM\gamemodes\OmegaArmy.pwn(292) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#2

Do you have a switch?
pawn Код:
switch(listitem)
{
    case 0://code
    case 1:ShowPlayerDialog(playerid, DIALOG_Sub, DIALOG_STYLE_LIST, "Sub Machine Guns", "$1000 - UZI\n$1000 - Tec-9\n$1500 - MP5", "Select", "Cancel");
//Edited as you had the closing bracket but no opening bracket.

}
Reply
#3

You have a closing bracket but no opening bracket
Reply
#4

pawn Код:
case 1: { ShowPlayerDialog(playerid, DIALOG_Sub, DIALOG_STYLE_LIST, "Sub Machine Guns", "$1000 - UZI\n$1000 - Tec-9\n$1500 - MP5", "Select", "Cancel"); }//Bracket had not been opened.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)