Jump to content
Sign in to follow this  
Sakai

Having a problem with config.cpp "missing "}"

Recommended Posts

Hello there! I've been working out how to fix my config.cpp for my flag for my FAC addon, I'm getting this error:

File flag\config.cpp, line 26:/CfgVehicles/: Missing "}"

Here is my config.cpp

#define protected	1
#define public		2
#define true	        1
#define false	        0

class CfgPatches {
class flag {
	units[] = {""};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {""};
};
};

class CfgVehicleClasses {
class flag {
	displayName = "FAC Flag";
};
};

class CfgVehicles {
class FlagCarrier;	// External class reference

class FlagCarrierFAC : FlagCarrier {
	scope = public;
	accuracy = 1000;	// accuracy needed to recognize type of this target
	displayName = "FAC Flag";

	class EventHandlers {
		init = "(_this select 0) setFlagTexture \flag\flag\flag_co.paa";
	};
};

Could anyone help me out? I'm 100% noob when it comes to making own config.cpp's :|

Share this post


Link to post
Share on other sites
Yep, the cfgvehicles class isn't closed. Add a }; at the end of the config.

Ah I see so thats how it should be! :D

Thank you!

Share this post


Link to post
Share on other sites

Use a program like Notepad++ or Scintilla and it clearly shows you matched or un-closed code syntax.

Select a "C" language, which is basically what BIS code is

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×