Jump to content
Eee1_

Undefined base class Error

Recommended Posts

 I am trying to make a mod. When trying to make my Uniforms it keeps spewing out the same error. I thought at first it was that I put the uniforms under CfgVehicles, and not CfgWeapons and so I changed that.
Now I have the following error - Line o: /CfgWeapons.092nd_StandardBDUY: Undefined Base Class 'U_B_CombatUniform_mcam'

Here is my Uniform code
class 092nd_Standard_BDU: U_B_CombatUniform_mcam
{
    scope=2;
    scopeArsenal=2;
    author="Winter";
    displayName="[092nd] Standard BDU";
    model="\A3\Characters_F\Common\Suitpacks\suitpack_blufor_diver";
    picture="\092ndNPCs\data\Icons\H3_ODST_Uniform.paa";
    class ItemInfo: UniformItem
    {
        uniformModel="-";
        uniformClass="092nd_BDU_Base";
        containerClass="Supply150";
        mass=10;
        uniformType="Neopren";
        modelSides[]={6};
    };
};

Any help solving the issue would be much appreciated!

Share this post


Link to post
Share on other sites

Is that the entire config? Because if that is the entire config its broken...

The first line of the (hopeful) snippet you posted:

class 092nd_Standard_BDU: U_B_CombatUniform_mcam

092nd_Standard_BDU is inheriting properties from class 'U_B_CombatUniform_mcam' which you haven't correctly defined previously in your code.

Try adding the following above your (again, hopefully) snippet of code:

class U_B_CombatUniform_mcam;

This will tell the game that 'U_B_CombatUniform_mcam' is an external class that is defined elsewhere (i.e not in your PBO).

 

You will also want to add 'A3_Characters_F' to the requiredAddons array at the top of your config to give the game a rough idea of where the external definition comes from:

class CfgPatches
{
	class YOUR_ADDON_CLASSNAME
	{
		author = "YOUR NAME GOES HERE";
		name = "WHATEVER";
		requiredAddons[] = {"A3_Characters_F"};
		requiredVersion = 0.1;
		units[] = {POPULATE THIS WITH YOUR NEW UNIT CLASS-NAMES};
		weapons[] = {POPULATE THIS WITH YOUR NEW UNIFORM CLASS-NAMES};
	};
};

 

Share this post


Link to post
Share on other sites

I have added the: class U_B_CombatUniform_mcam;
And I have added A3_Characters_F to my required addons.

 

Now I am getting
File 092ndNPCs\uniforms.hpp, line9: /CfgWeapons/092nd_Standard_BDU.ItemInfo: Undefined base class 'UniformItem'

New Code: 

 

class U_B_CombatUniform_mcam;
class 092nd_Standard_BDU: U_B_CombatUniform_mcam
{
    scope=2;
    scopeArsenal=2;
    author="Winter";
    displayName="[092nd] Standard BDU";
    model="\A3\Characters_F\Common\Suitpacks\suitpack_blufor_diver";
    picture="\092ndNPCs\data\Icons\H3_ODST_Uniform.paa";
    class ItemInfo: UniformItem
    {
        uniformModel="-";
        uniformClass="092nd_BDU_Base";
        containerClass="Supply150";
        mass=10;
        uniformType="Neopren";
        modelSides[]={6};
    };
};

 

Share this post


Link to post
Share on other sites

You're referencing another external class again (UniformItem) which you haven't defined. This one is a little different so you'll need to reference its sub-classes too, as seen below:

	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;
		};
	};

// REST OF CFGWEAPONS STUFF HERE

	class U_B_CombatUniform_mcam;
	class 092nd_Standard_BDU: U_B_CombatUniform_mcam
	{
		scope=2;
    	scopeArsenal=2;
    	author="Winter";
    	displayName="[092nd] Standard BDU";
    	model="\A3\Characters_F\Common\Suitpacks\suitpack_blufor_diver";
    	picture="\092ndNPCs\data\Icons\H3_ODST_Uniform.paa";
    	class ItemInfo: UniformItem
    	{
        	uniformModel="-";
        	uniformClass="092nd_BDU_Base";
        	containerClass="Supply150";
        	mass=10;
        	uniformType="Neopren";
        	modelSides[]={6};
    	};
};

Share this post


Link to post
Share on other sites

My uniform is not appearing in game. I see it in the Arsenal but when I equip it, it doesn't show the model and instead I am wearing underwear in game. I don't know why since its calling to a model and doesn't work

Share this post


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

My uniform is not appearing in game. I see it in the Arsenal but when I equip it, it doesn't show the model and instead I am wearing underwear in game. I don't know why since its calling to a model and doesn't work

Calling to a model for the uniform only sets what the uniform object looks like when its placed on the floor (i.e. the folded up bundle of clothes you see when you drop a uniform on the ground - hence the "suitpack" path).

The part you need to focus on to fix your issue is:

        	uniformClass="092nd_BDU_Base";

This entry (for each uniform) MUST correspond to a cfgUnits class - i.e. an infantryman, and THIS is where you define the actual uniform model (i.e. what it looks like when worn) as well as define hiddenselections etc.

My guess is you don't have a unit defined with the '092nd_BDU_Base' class...

 

Try having a read of Arma 3: Characters And Gear Encoding Guide for further info, it'll help you understand what you're trying to accomplish and hopefully eliminate a bit of the trial-and-error for you...

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

×