Jump to content
Sign in to follow this  
Emontex

Uniform Config Errors

Recommended Posts

I've reached the point where I'm giving up...

 

The error I get on startup is: "File Swiss_by_Keo\config.cpp, line 42: /cfgWeapons.model: Member already defined."

 

I have no idea what the problem is. If I delete any of the definitions I get an error code for that. Can somebody help me?

 

/// Uniform config ///

class cfgWeapons {
	class InventoryItem_Base_F;
	class ItemCore;
	
	class UniformItem: InventoryItem_Base_F {
		type = 801
		};
	
	class Uniform_Base: ItemCore {					//Uniform Base Definition --------------------------------------------
		scope = 0;
		allowedSlots[] = {901};
		class ItemInfo: UniformItem {
			uniformModel = "-";
			uniformClass = "B_Soldier_F";
			containerClass = "Supply0";
			mass = 0;
		};
	}; 												//Uniform Base Definition --------------------------------------------
	
	// Uniform -----------------------------------------------------------------------------------------------------------
	
	class CHE_TAZ: Uniform_Base { // SWISS_WOODLAND_TAZ
		scope = 2;
		author = "Emontex";
		displayName = "CHE TAZ 90";
		picture = {""}//--------------------------------------------------------------------------
		model =  "\A3\Characters_F\Common\Suitpacks\suitpack_universal_F.p3d";
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Swiss_by_Keo\Uniform_TAZ_90\suitpack_swiss_woodland_co.paa"};
		
		class ItemInfo : UniformItem {
			uniformModel = "-";
			uniformClass = "CHE_Soldier_Base";
			containerClass = "Supply40";
			mass = 40;
		}; 
	
	class CHE_TAZ_rolledup : Uniform_Base { // SWISS_WOODLAND_TAZ_rolledup
		scope = 2;
		author = "Emontex";
		displayName = "CHE TAZ 90 Rolled-Up";
		picture = {""}//--------------------------------------------------------------------------
		model =  "\A3\Characters_F\Common\Suitpacks\suitpack_universal_F.p3d";
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Swiss_by_Keo\Uniform_TAZ_90\suitpack_swiss_woodland_co.paa"};
		
		class ItemInfo : UniformItem {
			uniformModel = "-";
			uniformClass = "CHE_Soldier_rolledup";
			containerClass = "Supply40";
			mass = 40; 
		}; 
	
	class CHE_TAZ_tshirt : Uniform_Base { // SWISS_WOODLAND_TAZ_tshirt
		scope = 2;
		author = "Emontex";
		displayName = "CHE TAZ 90 T-Shirt";
		picture = {""}//--------------------------------------------------------------------------
		model =  "\A3\Characters_F\Common\Suitpacks\suitpack_universal_F.p3d";
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Swiss_by_Keo\Uniform_TAZ_90\suitpack_swiss_woodland_co.paa"};
		
		class ItemInfo : UniformItem {
			uniformModel = "-";
			uniformClass = "CHE_Soldier_tshirt";
			containerClass = "Supply40";
			mass = 30;
		}; 
};

/// Sample character config ///
class cfgVehicles {
	class Man;
	class B_Soldier_F;
	
	class CHE_Soldier_Base: B_Soldier_F {
		side = 1;
		scope = 2;
		displayName = "CHE Soldier Base";
		uniformClass= "CHE_TAZ";
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Swiss_by_Keo\Uniform_TAZ_90\SWISS_W_clothing.paa"};
		linkedItems[] = {"ItemMap","ItemCompass","ItemWatch","ItemRadio"};
		respawnLinkedItems[] = {"ItemMap","ItemCompass","ItemWatch","ItemRadio"};
		weapons[] = {"Throw","Put"};
		respawnWeapons[] = {"Throw","Put"};
		magazines[] = {};
		respawnMagazines[] = {};
	};
	
	class CHE_Soldier_rolledup: CHE_Soldier_Base {
	
		displayName = "CHE Soldier Rolled-Up";
		uniformClass = "CHE_TAZ_rolledup";
		model = "\A3\characters_F\BLUFOR\b_soldier_03.p3d";// Rolled sleeve
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Swiss_by_Keo\Uniform_TAZ_90\SWISS_W_clothing.paa"};
	};
	
	class CHE_Soldier_tshirt: CHE_Soldier_Base {
	
		displayName = "CHE Soldier T-Shirt";
		uniformClass = "CHE_TAZ_tshirt";
		model = "\A3\characters_F\BLUFOR\b_soldier_02.p3d";// T-Shirt
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Swiss_by_Keo\Uniform_TAZ_90\SWISS_W_clothing.paa"};
	};
};

 

Share this post


Link to post
Share on other sites
1 hour ago, Emontex said:

[...]

The error I get on startup is: "File Swiss_by_Keo\config.cpp, line 42: /cfgWeapons.model: Member already defined."

[...]

The part you need to focus on is: 'config.cpp, line 42: /cfgWeapons.model: Member already defined'

So, line 42 of your config - Open your config in Notepad and press CTRL+G and enter 42 in the pop-up box and that will take you to line 42.

Note, as this is line 42 of your entire config, you can't do this with the code snippet you posted. If the above snippet is your entire config, you need to add at least a cfgPatches section...

Then look for a model=""; parameter on that line. 

"Member already defined" means that your class has more than one model=""; parameter defined and its breaking your config as it doesn't know which to use so remove the duplicate/extra entry.

Share this post


Link to post
Share on other sites
1 hour ago, Jackal326 said:

Note, as this is line 42 of your entire config, you can't do this with the code snippet you posted. If the above snippet is your entire config, you need to add at least a cfgPatches section...

Then look for a model=""; parameter on that line. 

"Member already defined" means that your class has more than one model=""; parameter defined and its breaking your config as it doesn't know which to use so remove the duplicate/extra entry.

 

Okay, I tried to write cfgPatches directly into the config.cpp instead of including it in case that was the problem.

The error still persists, but jumped to line 65...

author = "Emontex";
		displayName = "CHE TAZ 90 Rolled-Up";
		picture = {""}//--------------------------------------------------------------------------
		model =  ""; // \A3\Characters_F\Common\Suitpacks\suitpack_universal_F.p3d
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Swiss_by_Keo\Uniform_TAZ_90\suitpack_swiss_woodland_co.paa"};

BUT the problem is (this was also the case before it changed lines) the code snippet you see begins with line 65. The "model-line" is 68. Also, as you can see, I tried excluding it (partly as shown above, and completely). That didn't work either, but the error jumped to line 66... 

Share this post


Link to post
Share on other sites

This ist the complete code:

/// cfgPatches (CORE!) ///

class cfgPatches {
	class CHE_Equipment {
		units[] = {
			"CHE_Soldier_Base",
			"CHE_Soldier_rolledup",
			"CHE_Soldier_tshirt"
		};
		
		weapons[] = {
			"CHE_TAZ",
			"CHE_TAZ_rolledup",
			"CHE_TAZ_tshirt"
		};
		
		requiredAddons[] = {
			"A3_Weapons_F",
			"A3_Characters_F_BLUFOR"
		};
	};
};

/// Uniform config ///

class cfgWeapons {
	class InventoryItem_Base_F;
	class ItemCore;
	
	class UniformItem: InventoryItem_Base_F {
		type = 801
		};
	
	class Uniform_Base: ItemCore {					//Uniform Base Definition --------------------------------------------
		scope = 0;
		allowedSlots[] = {901};
		class ItemInfo: UniformItem {
			uniformModel = "-";
			uniformClass = "B_Soldier_F";
			containerClass = "Supply0";
			mass = 0;
		};
	}; 												//Uniform Base Definition --------------------------------------------
	
	// Uniform -----------------------------------------------------------------------------------------------------------
	
	class CHE_TAZ: Uniform_Base { // SWISS_WOODLAND_TAZ
		scope = 2;
		author = "Emontex";
		displayName = "CHE TAZ 90";
		picture = {""}//--------------------------------------------------------------------------
		/* model =  "";  \A3\Characters_F\Common\Suitpacks\suitpack_universal_F.p3d */
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Swiss_by_Keo\Uniform_TAZ_90\suitpack_swiss_woodland_co.paa"};
		
		class ItemInfo : UniformItem {
			uniformModel = "-";
			uniformClass = "CHE_Soldier_Base";
			containerClass = "Supply40";
			mass = 40;
		}; 
	
	class CHE_TAZ_rolledup : Uniform_Base { // SWISS_WOODLAND_TAZ_rolledup
		scope = 2;
		author = "Emontex";
		displayName = "CHE TAZ 90 Rolled-Up";
		picture = {""}//--------------------------------------------------------------------------
		/* model =  "";  \A3\Characters_F\Common\Suitpacks\suitpack_universal_F.p3d */
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Swiss_by_Keo\Uniform_TAZ_90\suitpack_swiss_woodland_co.paa"};
		
		class ItemInfo : UniformItem {
			uniformModel = "-";
			uniformClass = "CHE_Soldier_rolledup";
			containerClass = "Supply40";
			mass = 40; 
		}; 
	
	class CHE_TAZ_tshirt : Uniform_Base { // SWISS_WOODLAND_TAZ_tshirt
		scope = 2;
		author = "Emontex";
		displayName = "CHE TAZ 90 T-Shirt";
		picture = {""}//--------------------------------------------------------------------------
		/* model =  "";  \A3\Characters_F\Common\Suitpacks\suitpack_universal_F.p3d */
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Swiss_by_Keo\Uniform_TAZ_90\suitpack_swiss_woodland_co.paa"};
		
		class ItemInfo : UniformItem {
			uniformModel = "-";
			uniformClass = "CHE_Soldier_tshirt";
			containerClass = "Supply40";
			mass = 30;
		}; 
};

/// Sample character config ///
class cfgVehicles {
	class Man;
	class B_Soldier_F;
	
	class CHE_Soldier_Base: B_Soldier_F {
		side = 1;
		scope = 2;
		displayName = "CHE Soldier Base";
		uniformClass= "CHE_TAZ";
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Swiss_by_Keo\Uniform_TAZ_90\SWISS_W_clothing.paa"};
		linkedItems[] = {"ItemMap","ItemCompass","ItemWatch","ItemRadio"};
		respawnLinkedItems[] = {"ItemMap","ItemCompass","ItemWatch","ItemRadio"};
		weapons[] = {"Throw","Put"};
		respawnWeapons[] = {"Throw","Put"};
		magazines[] = {};
		respawnMagazines[] = {};
	};
	
	class CHE_Soldier_rolledup: CHE_Soldier_Base {
	
		displayName = "CHE Soldier Rolled-Up";
		uniformClass = "CHE_TAZ_rolledup";
		model = "\A3\characters_F\BLUFOR\b_soldier_03.p3d";// Rolled sleeve
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Swiss_by_Keo\Uniform_TAZ_90\SWISS_W_clothing.paa"};
	};
	
	class CHE_Soldier_tshirt: CHE_Soldier_Base {
	
		displayName = "CHE Soldier T-Shirt";
		uniformClass = "CHE_TAZ_tshirt";
		model = "\A3\characters_F\BLUFOR\b_soldier_02.p3d";// T-Shirt
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Swiss_by_Keo\Uniform_TAZ_90\SWISS_W_clothing.paa"};
	};
};

 

Share this post


Link to post
Share on other sites

The following is incorrect, which is why the following line where you define the model was throwing an error:

picture = {""}//--------------------------------------------------------------------------

You are missing a semi-colon ( ; ) at the end of that line. When commenting out be sure to leave spaces (or don't add random junk to your code) and it makes things easier to spot.

Also, a few of your uniform classes weren't closed with }; which would throw you more errors...The below should work success not guaranteed.

Spoiler

/// cfgPatches (CORE!) ///

class cfgPatches {
	class CHE_Equipment {
		units[] = {
			"CHE_Soldier_Base",
			"CHE_Soldier_rolledup",
			"CHE_Soldier_tshirt"
		};
		
		weapons[] = {
			"CHE_TAZ",
			"CHE_TAZ_rolledup",
			"CHE_TAZ_tshirt"
		};
		
		requiredAddons[] = {
			"A3_Weapons_F",
			"A3_Characters_F_BLUFOR"
		};
	};
};

/// Uniform config ///

class cfgWeapons {
	class InventoryItem_Base_F;
	class ItemCore;
	
	class UniformItem: InventoryItem_Base_F 
	{
		type = 801
	};
	
	class Uniform_Base: ItemCore 
	{					
		scope = 0;
		allowedSlots[] = {901};
		class ItemInfo: UniformItem 
		{
			uniformModel = "-";
			uniformClass = "B_Soldier_F";
			containerClass = "Supply0";
			mass = 0;
		};
	}; 												

//Uniform Base Definition --------------------------------------------
	
// Uniform -----------------------------------------------------------------------------------------------------------
	
	class CHE_TAZ: Uniform_Base 
	{ 
		scope = 2;
		author = "Emontex";
		displayName = "CHE TAZ 90";
		picture = {""}; //--------------------------------------------------------------------------
		/* model =  "\A3\Characters_F\Common\Suitpacks\suitpack_universal_F.p3d"; */
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Swiss_by_Keo\Uniform_TAZ_90\suitpack_swiss_woodland_co.paa"};
		
		class ItemInfo : UniformItem 
		{
			uniformModel = "-";
			uniformClass = "CHE_Soldier_Base";
			containerClass = "Supply40";
			mass = 40;
		};
	}; 
	
	class CHE_TAZ_rolledup: Uniform_Base 
	{ 
		scope = 2;
		author = "Emontex";
		displayName = "CHE TAZ 90 Rolled-Up";
		picture = {""}; //--------------------------------------------------------------------------
		/* model =  "\A3\Characters_F\Common\Suitpacks\suitpack_universal_F.p3d"; */
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Swiss_by_Keo\Uniform_TAZ_90\suitpack_swiss_woodland_co.paa"};
		
		class ItemInfo : UniformItem 
		{
			uniformModel = "-";
			uniformClass = "CHE_Soldier_rolledup";
			containerClass = "Supply40";
			mass = 40; 
		}; 
	};
	
	class CHE_TAZ_tshirt: Uniform_Base 
	{
		scope = 2;
		author = "Emontex";
		displayName = "CHE TAZ 90 T-Shirt";
		picture = {""};//--------------------------------------------------------------------------
		/* model =  "\A3\Characters_F\Common\Suitpacks\suitpack_universal_F.p3d"; */
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Swiss_by_Keo\Uniform_TAZ_90\suitpack_swiss_woodland_co.paa"};
		
		class ItemInfo : UniformItem 
		{
			uniformModel = "-";
			uniformClass = "CHE_Soldier_tshirt";
			containerClass = "Supply40";
			mass = 30;
		}; 
};

/// Sample character config ///
class cfgVehicles 
{
	class Man;
	class B_Soldier_F;
	
	class CHE_Soldier_Base: B_Soldier_F 
	{
		side = 1;
		scope = 2;
		displayName = "CHE Soldier Base";
		uniformClass= "CHE_TAZ";
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Swiss_by_Keo\Uniform_TAZ_90\SWISS_W_clothing.paa"};
		linkedItems[] = {"ItemMap","ItemCompass","ItemWatch","ItemRadio"};
		respawnLinkedItems[] = {"ItemMap","ItemCompass","ItemWatch","ItemRadio"};
		weapons[] = {"Throw","Put"};
		respawnWeapons[] = {"Throw","Put"};
		magazines[] = {};
		respawnMagazines[] = {};
	};
	
	class CHE_Soldier_rolledup: CHE_Soldier_Base 
	{
	
		displayName = "CHE Soldier Rolled-Up";
		uniformClass = "CHE_TAZ_rolledup";
		model = "\A3\characters_F\BLUFOR\b_soldier_03.p3d";// Rolled sleeve
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Swiss_by_Keo\Uniform_TAZ_90\SWISS_W_clothing.paa"};
	};
	
	class CHE_Soldier_tshirt: CHE_Soldier_Base 
	{
	
		displayName = "CHE Soldier T-Shirt";
		uniformClass = "CHE_TAZ_tshirt";
		model = "\A3\characters_F\BLUFOR\b_soldier_02.p3d";// T-Shirt
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Swiss_by_Keo\Uniform_TAZ_90\SWISS_W_clothing.paa"};
	};
};

 

 

  • Like 1

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  

×