SA-MP Forums Archive
Why does this happen? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Why does this happen? (/showthread.php?tid=468204)



Why does this happen? - IPlayGames000 - 07.10.2013

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.



Re: Why does this happen? - EiresJason - 07.10.2013

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.

}



Re: Why does this happen? - [ABK]Antonio - 07.10.2013

You have a closing bracket but no opening bracket


Re: Why does this happen? - willttoonn - 07.10.2013

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.