Jump to content
Sign in to follow this  
Aglos

Truck config throwing undefined base class error.

Recommended Posts

Hello everyone!

   I'm creating a series of PLA-inspired trucks using the KAMAZ model as a base.  I have been able to introduce a single, covered, truck with the config that I have written, but when I try to add any other trucks I get an undefined base class error.  I have been poking around the internet for two nights solid trying to figure out where I went wrong; I've even downloaded other people's work in order to see how they did it, but I'm still at a loss.  Could someone please take a look at what I have written and tell me what I'm missing?  At this point I feel like I'm just throwing odd bits of code at it in an attempt to fix the issue.

#define true	1
#define false	0

#define private		0
#define protected		1
#define public		2

#define TEast		0
#define TWest		1
#define TGuerrila		2
#define TCivilian		3
#define TSideUnknown		4
#define TEnemy		5
#define TFriendly		6
#define TLogic		7

class CfgPatches
{
	class PLA_Trucks
	{
		units[]={};
		weapons[]={};
		requiredVersion=0.1;
		requiredAddons[]={"A3_Soft_F_Beta"};
	};
};
class CfgVehicles
{
	class I_Truck_02_ammo_F;
	class I_Truck_02_fuel_F;
	class I_Truck_02_medical_F;
	class I_Truck_02_box_F;
	class I_Truck_02_covered_F;
	class I_Truck_02_transport_F;
	class PLA_Truck_Base: I_Truck_02_covered_F
	{
	scope = 0;
	hiddenSelections[] = {"Camo1","Camo2","Camo3"};
	hiddenSelectionsTextures[] = {"","",""};
	};
	
	class PLA_Medical_Base: I_Truck_02_covered_F
	{
	scope = 0;
	hiddenSelections[] = {"Camo1","Camo2","Camo3"};
	hiddenSelectionsTextures[] = {"","",""};
	};
	
	class PLA_Truck_Covered: PLA_Truck_Base
	{
		author="DFHS";
		mapSize=7.8400002;
		side=2;
		faction="PLA";
		crew="PLA_Driver_Universal";
		scope=2;
		HeadAimDown=5;
		displayName="PLA Truck (Covered)";
		model="\A3\soft_f_beta\Truck_02\Truck_02_covered_F.p3d";
		picture="\A3\soft_f_beta\Truck_02\data\UI\Truck_02_covered_CA.paa";
		Icon="\A3\soft_f_beta\Truck_02\data\UI\Map_Truck_02_CA.paa";
		cost=50000;
		slingLoadCargoMemoryPoints[]=
		{
			"SlingLoadCargo1",
			"SlingLoadCargo2",
			"SlingLoadCargo3",
			"SlingLoadCargo4"
		};
		weapons[]=
		{
			"TruckHorn3"
		};
		magazines[]={};
		armor=100;
		typicalCargo[]=
		{
			"PLA_Rifleman_Universal",
			"PLA_Rifleman_Universal"
		};
		hiddenSelections[]=
		{
			"Camo1",
			"Camo2"
		};
		hiddenSelectionsTextures[]=
		{
			"\China\Trucks\data\Chinese_Truck_Cab_co.paa",
			"\China\Trucks\data\Chinese_Truck_Bed_co.paa"
		};
		transportSoldier=14;
		transportAmmo=0;
		transportRepair=0;
		cargoProxyIndexes[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14};
		getInProxyOrder[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
		};
	};
	
	class PLA_Truck_Medical: I_Truck_02_covered_F
	{
		mapSize=7.8400002;
		side=2;
		faction="PLA";
		crew="PLA_Medic_Universal";
		scope=2;
		author="DFHS";
		HeadAimDown=5;
		vehicleclass = "Support";
		displayName="PLA Medical Truck";
		supplyRadius=6.8000002;
		attendant=1;
		threat[]={0,0,0};
		model="\A3\soft_f_beta\Truck_02\Truck_02_covered_F.p3d";
		picture="\China\Trucks\data\icons\portrait_china_truck_medic_ca.paa";
		Icon="\China\Trucks\data\icons\map_china_truck_medic_ca.paa";
		cost=50000;
		slingLoadCargoMemoryPoints[]=
		{
			"SlingLoadCargo1",
			"SlingLoadCargo2",
			"SlingLoadCargo3",
			"SlingLoadCargo4"
		};
		weapons[]=
		{
			"TruckHorn3"
		};
		magazines[]={};
		armor=100;
		typicalCargo[]=
		{
			"PLA_Medic_Universal",
			"PLA_Medic_Universal"
		};
		hiddenSelections[]=
		{
			"Camo1",
			"Camo2"
		};
		hiddenSelectionsTextures[]=
		{
			"\China\Trucks\data\Chinese_Medic_Cab_co.paa",
			"\China\Trucks\data\Chinese_Medic_Bed_co.paa"
		};
		transportSoldier=14;
		transportAmmo=0;
		transportRepair=0;
		cargoProxyIndexes[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14};
		getInProxyOrder[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
		};
	};
	
	class PLA_Truck_Transport: I_Truck_02_transport_F
	{
		author="DFHS";
		mapSize=7.8400002;
		side=2;
		crew="PLA_Driver_Universal";
		scope=2;
		faction="PLA";
		model="\A3\soft_f_beta\Truck_02\Truck_02_transport_F";
		picture="\A3\soft_f_beta\Truck_02\data\UI\Truck_02_transport_CA.paa";
		Icon="\A3\soft_f_beta\Truck_02\data\UI\Map_Truck_02_dump_CA.paa";
		magazines[]={};
		armor=100;
		typicalCargo[]=
		{
			"PLA_Rifleman_Universal",
			"PLA_Rifleman_Universal"
		};
		hiddenSelections[]=
		{
			"Camo1",
			"Camo2"
		};
		hiddenSelectionsTextures[]=
		{
			"\China\Trucks\data\Chinese_Truck_Cab_co.paa",
			"\China\Trucks\data\Chinese_Truck_Bed_co.paa"
		};
		castCargoShadow=1;
		transportSoldier=14;
		cargoProxyIndexes[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14};
		getInProxyOrder[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
		};
	};
};

Thanks in advance for any assistance with this.

 

Tom

Share this post


Link to post
Share on other sites

Locklear,

 

   Thanks for the quick response.  I removed the '};' that you pointed out.  I'm still getting the undefined base class error on the medical truck.  If I comment out the medical truck, then I get the same error on the transport truck.  Somehow I'm not defining the following trucks in the list correctly, but I can't figure out why.  I defined the base PLA truck and had the covered truck inherit that definition.  I wanted the medical truck to inherit the covered truck as it's parent class, but it did not work.  I tried to have the medical truck inherit from the same class as the PLA_Truck_Base, but no go there either. 

 

Tom

Share this post


Link to post
Share on other sites

I'm not in the office at the moment, so I'll try to find the problem tomorrow. However, note that you have a couple of classes declared in the config, which you actually don't use anywhere. It might be a good idea to clean the code up a bit, and see, if it helps.

Share this post


Link to post
Share on other sites

Ok, I'll take out the extra classes.  Some of them were for trucks I had planned on creating later.  I'll get rid of them and see if that helps. 

 

Thanks,

 

Tom

Share this post


Link to post
Share on other sites

Locklear,

 

Thanks for your help!  You were right the on the first reply!  There was one additional '};' that didn't need to be in the code.  Once I removed it, the problem was solved!!  Thank you very much.

 

Tom

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  

×