SA-MP Forums Archive
error 001: expected token: "}", but found "enum" - 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: error 001: expected token: "}", but found "enum" (/showthread.php?tid=342014)



error 001: expected token: "}", but found "enum" - Graffity21 - 12.05.2012

Код:
enum {
			CommonRed = 19006,
			CommonOrange,
			CommonGreen,
			CommonBlue,
			CommonPurple,
			CommonEspiral,
			CommonBlack,
			CommonEyes,
			CommonXadrex,
			CommonTransparent,
			CommonXRayVision,
			SquareFormatYellow,
			SquareFormatOrange,
			SquareFormatRed,
			SquareFormatBlue,
			SquareFormatGreen,
			RayBanGray,
			RayBanBlue,
			RayBanPurple,
			RayBanPink,
			RayBanRed,
			RayBanOrange,
			RayBanYellow,
			RayBanGreen,
			CircularNormal,
			CircularYellow,
			CircularRed,
			CircularBlack,
			CircularXadrex,
			CircularThunders,
			CopGlassesBlack = 19138,
			CopGlassesRed = 19139,
			CopGlassesBlue = 19140,
};
when i compile it give me an error: error 001: expected token: "}", but found "enum"

hmm?what is wrong here?help me pls!!!


Re: error 001: expected token: "}", but found "enum" - [D]ry[D]esert - 12.05.2012

Nothing wrong with this i try it and it work maybe another thing cause this


Re: error 001: expected token: "}", but found "enum" - Audi_Quattrix - 12.05.2012

Im not pro but probably One line up of this script u pasted u forgot to type ''}''


Re: error 001: expected token: "}", but found "enum" - TheDominator - 12.05.2012

Show the line above the enum.


Re: error 001: expected token: "}", but found "enum" - Abreezy - 12.05.2012

Doesn't an enum usually need a name?

pawn Код:
enum randomshit
{

};



Re: error 001: expected token: "}", but found "enum" - TheDominator - 12.05.2012

As if we missed out the name of the enum, we such noobs.


Re: error 001: expected token: "}", but found "enum" - Abreezy - 12.05.2012

Quote:
Originally Posted by TheDominator
Посмотреть сообщение
As if we missed out the name of the enum, we such noobs.
I can't tell if you're being sarcastic, or I just can't interpret what you mean.


AW: error 001: expected token: "}", but found "enum" - Nero_3D - 12.05.2012

He is sarcastic and the error just means that the compiler expected the token "}" but found "enum"

Also something like that
pawn Код:
new array[] = { 0
// missing closing bracket
enum {}



Re: error 001: expected token: "}", but found "enum" - sniperwars - 12.05.2012

pawn Код:
enum yourenumnamehere
{
    CommonRed = 19006,
    CommonOrange,
    CommonGreen,
    CommonBlue,
    CommonPurple,
    CommonEspiral,
    CommonBlack,
    CommonEyes,
    CommonXadrex,
    CommonTransparent,
    CommonXRayVision,
    SquareFormatYellow,
    SquareFormatOrange,
    SquareFormatRed,
    SquareFormatBlue,
    SquareFormatGreen,
    RayBanGray,
    RayBanBlue,
    RayBanPurple,
    RayBanPink,
    RayBanRed,
    RayBanOrange,
    RayBanYellow,
    RayBanGreen,
    CircularNormal,
    CircularYellow,
    CircularRed,
    CircularBlack,
    CircularXadrex,
    CircularThunders,
    CopGlassesBlack = 19138,
    CopGlassesRed = 19139,
    CopGlassesBlue = 19140,
};