Forum Jump :

Author Message


Posts: 7
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2015-09-10 01:40        
     
So I am trying to make an replacement config that replaces the default MX rifles with black ones, and I keep getting this error when I try to load my config. I have it in bin form, I have tried weapons = {}; and weapons[] = {};, and also I have tried it with my custom weapons in the weapons array. I am at a loss as to what I am doing wrong and any help would be awesome.

My config:
class CfgPatches {
	class Black_MX_Replacement {
		units[] = {};
		weapons[] = {"arifle_MX_SW_Black_Hamr_pointer_F","arifle_MX_GL_Black_Holo_pointer_snds_F","arifle_MX_GL_Black_ACO_pointer_F","arifle_MX_Black_ACO_pointer_F","arifle_MX_Black_ACO_pointer_snds_F","arifle_MX_Black_RCO_pointer_snds_F","arifle_MXC_Black_Holo_pointer_F","arifle_MXC_Black_ACO_pointer_snds_F","arifle_MXM_Black_RCO_pointer_F","arifle_MXM_Black_RCO_pointer_snds_F","arifle_MMG_02_black_RCO_pointer_F","srifle_DMR_02_Black_RCO_pointer_snds_F"};
		requiredVersion = 0.100000;
		requiredAddons[] = {"A3_Data_F","A3_Weapons_F","A3_Characters_F","A3_Weapons_F_Rifles_MX"};
	};
};

/*extern*/ class Mode_SemiAuto;
/*extern*/ class Mode_Burst;
/*extern*/ class Mode_FullAuto;
/*extern*/ class SlotInfo;
/*extern*/ class CowsSlot;
/*extern*/ class PointerSlot;
/*extern*/ class Land;
/*extern*/ class SoldierWB;
/*extern*/ class B_Soldier_03_f;
/*extern*/ class B_Soldier_02_f;
/*extern*/ class B_Helipilot_F;
/*extern*/ class B_Soldier_recon_base;
/*extern*/ class B_Soldier_sniper_base_F;



class CfgVehicles {
	
	class B_Soldier_base_F: SoldierWB {
		weapons = {"arifle_MX_Black_ACO_pointer_F", "hgun_P07_F", "Throw", "Put"};
		respawnWeapons = {"arifle_MX_Black_ACO_pointer_F", "hgun_P07_F", "Throw", "Put"};
	};

	class B_Soldier_lite_F: B_Soldier_03_f {
		weapons = {"arifle_MX_Black_ACO_pointer_F", "hgun_P07_F", "Throw", "Put"};
		respawnWeapons = {"arifle_MX_Black_ACO_pointer_F", "hgun_P07_F", "Throw", "Put"};
	};

	class B_Soldier_GL_F: B_Soldier_base_F {
		weapons = {"arifle_MX_GL_Black_ACO_pointer_F", "hgun_P07_F", "Throw", "Put"};
		respawnWeapons = {"arifle_MX_GL_Black_ACO_pointer_F", "hgun_P07_F", "Throw", "Put"};
	};

	class B_soldier_AR_F: B_Soldier_02_f {
		weapons = {"arifle_MX_SW_Black_Hamr_pointer_F", "hgun_P07_F", "Throw", "Put"};
		respawnWeapons = {"arifle_MX_SW_Black_Hamr_pointer_F", "hgun_P07_F", "Throw", "Put"};
	};

	class B_Soldier_SL_F: B_Soldier_03_f {
		weapons = {"arifle_MX_Black_Hamr_pointer_F", "hgun_P07_F", "Throw", "Put", "Binocular"};
		respawnWeapons = {"arifle_MX_Black_Hamr_pointer_F", "hgun_P07_F", "Throw", "Put", "Binocular"};
	};

	class B_Soldier_TL_F: B_Soldier_03_f {
		weapons = {"arifle_MX_GL_Black_Hamr_pointer_F", "hgun_P07_F", "Throw", "Put"};
		respawnWeapons = {"arifle_MX_GL_Black_Hamr_pointer_F", "hgun_P07_F", "Throw", "Put"};
	};

	class B_soldier_M_F: B_Soldier_base_F {
		weapons = {"arifle_MXM_Black_RCO_pointer_F", "hgun_P07_F", "Throw", "Put"};
		respawnWeapons = {"arifle_MXM_Black_RCO_pointer_F", "hgun_P07_F", "Throw", "Put"};
	};

	class B_soldier_LAT_F: B_Soldier_base_F {
		weapons = {"arifle_MX_Black_ACO_pointer_F", "launch_NLAW_F", "hgun_P07_F", "Throw", "Put"};
		respawnWeapons = {"arifle_MX_Black_ACO_pointer_F", "launch_NLAW_F", "hgun_P07_F", "Throw", "Put"};
	};

	class B_medic_F: B_Soldier_02_f {
		weapons = {"arifle_MX_Black_ACO_pointer_F", "hgun_P07_F", "Throw", "Put"};
		respawnWeapons = {"arifle_MX_Black_ACO_pointer_F", "hgun_P07_F", "Throw", "Put"};
	};

	class B_soldier_repair_F: B_Soldier_base_F {
		weapons = {"arifle_MX_Black_ACO_pointer_F", "hgun_P07_F", "Throw", "Put"};
		respawnWeapons = {"arifle_MX_Black_ACO_pointer_F", "hgun_P07_F", "Throw", "Put"};
	};

	class B_soldier_exp_F: B_Soldier_base_F {
		weapons = {"arifle_MXC_Black_Holo_pointer_F", "hgun_P07_F", "Throw", "Put"};
		respawnWeapons = {"arifle_MXC_Black_Holo_pointer_F", "hgun_P07_F", "Throw", "Put"};
	};

	class B_Soldier_A_F: B_Soldier_base_F {
		weapons = {"arifle_MX_Black_ACO_pointer_F", "hgun_P07_F", "Throw", "Put"};
		respawnWeapons = {"arifle_MX_Black_ACO_pointer_F", "hgun_P07_F", "Throw", "Put"};
	};

	class B_soldier_AT_F: B_Soldier_base_F {
		weapons = {"arifle_MXC_Black_Holo_pointer_F", "launch_B_Titan_short_F", "hgun_P07_F", "Throw", "Put"};
		respawnWeapons = {"arifle_MXC_Black_Holo_pointer_F", "launch_B_Titan_short_F", "hgun_P07_F", "Throw", "Put"};
	};

	class B_soldier_AA_F: B_Soldier_base_F {
		weapons = {"arifle_MXC_Black_Holo_pointer_F", "launch_B_Titan_F", "hgun_P07_F", "Throw", "Put"};
		respawnWeapons = {"arifle_MXC_Black_Holo_pointer_F", "launch_B_Titan_F", "hgun_P07_F", "Throw", "Put"};
	};

	class B_engineer_F: B_Soldier_03_f {
		weapons = {"arifle_MXC_Black_Holo_pointer_F", "hgun_P07_F", "Throw", "Put"};
		respawnWeapons = {"arifle_MXC_Black_Holo_pointer_F", "hgun_P07_F", "Throw", "Put"};
	};

	class B_crew_F: B_Soldier_03_f {
		weapons = {"arifle_MXC_Black_Holo_pointer_F", "hgun_P07_F", "Throw", "Put"};
		respawnWeapons = {"arifle_MXC_Black_Holo_pointer_F", "hgun_P07_F", "Throw", "Put"};
	};

	class B_officer_F: B_Soldier_base_F {
		weapons = {"arifle_MXC_Black_Holo_pointer_F", "hgun_Pistol_heavy_01_MRD_F", "Throw", "Put"};
		respawnWeapons = {"arifle_MXC_Black_Holo_pointer_F", "hgun_Pistol_heavy_01_MRD_F", "Throw", "Put"};
	};

	class B_helicrew_F: B_Helipilot_F {
		weapons = {"arifle_MXC_Black_Holo_pointer_F", "Throw", "Put"};
		respawnWeapons = {"arifle_MXC_Black_Holo_pointer_F", "Throw", "Put"};
	};

	class B_recon_F: B_Soldier_recon_base {
		weapons = {"arifle_MX_Black_ACO_pointer_snds_F", "hgun_P07_snds_F", "Throw", "Put", "Binocular"};
		respawnWeapons = {"arifle_MX_Black_ACO_pointer_snds_F", "Throw", "Put", "Binocular"};
	};

	class B_recon_LAT_F: B_Soldier_recon_base {
		weapons = {"arifle_MX_Black_ACO_pointer_snds_F", "launch_NLAW_F", "hgun_P07_snds_F", "Throw", "Put"};
		respawnWeapons = {"arifle_MX_Black_ACO_pointer_snds_F", "launch_NLAW_F", "Throw", "Put"};
	};

	class B_recon_exp_F: B_Soldier_recon_base {
		weapons = {"arifle_MX_Black_ACO_pointer_snds_F", "hgun_P07_snds_F", "Throw", "Put"};
		respawnWeapons = {"arifle_MX_Black_ACO_pointer_snds_F", "Throw", "Put"};
	};

	class B_recon_medic_F: B_Soldier_recon_base {
		weapons = {"arifle_MX_Black_ACO_pointer_snds_F", "hgun_P07_snds_F", "Throw", "Put"};
		respawnWeapons = {"arifle_MX_Black_ACO_pointer_snds_F", "hgun_P07_snds_F", "Throw", "Put"};
	};

	class B_recon_TL_F: B_Soldier_recon_base {
		weapons = {"arifle_MX_Black_RCO_pointer_snds_F", "hgun_P07_snds_F", "Throw", "Put", "Rangefinder"};
		respawnWeapons = {"arifle_MX_Black_RCO_pointer_snds_F", "hgun_P07_snds_F", "Throw", "Put", "Rangefinder"};
	};

	class B_recon_M_F: B_Soldier_recon_base {
		weapons = {"arifle_MXM_Black_RCO_pointer_snds_F", "hgun_P07_snds_F", "Throw", "Put", "Rangefinder"};
		respawnWeapons = {"arifle_MXM_Black_RCO_pointer_snds_F", "hgun_P07_snds_F", "Throw", "Put", "Rangefinder"};
	};

	class B_recon_JTAC_F: B_Soldier_recon_base {
		weapons = {"arifle_MX_GL_Black_Holo_pointer_snds_F", "hgun_P07_snds_F", "Throw", "Put", "Laserdesignator"};
		respawnWeapons = {"arifle_MX_GL_Black_Holo_pointer_snds_F", "hgun_P07_snds_F", "Throw", "Put", "Laserdesignator"};
	};

	class B_spotter_F: B_Soldier_sniper_base_F {
		weapons = {"arifle_MX_Black_Hamr_pointer_F", "hgun_P07_snds_F", "Throw", "Put", "Laserdesignator"};
		respawnWeapons = {"arifle_MX_Black_Hamr_pointer_F", "hgun_P07_snds_F", "Throw", "Put", "Laserdesignator"};
	};

	class B_Story_Protagonist_F: B_Soldier_base_F {
		weapons = {"arifle_MX_GL_Black_Hamr_pointer_F", "hgun_P07_snds_F", "Throw", "Put"};
		respawnweapons = {"arifle_MX_GL_Black_Hamr_pointer_F", "hgun_P07_snds_F", "Throw", "Put"};
	};

	class B_Soldier_support_base_F: B_Soldier_base_F {
		weapons = {"arifle_MX_Black_ACO_pointer_F", "hgun_P07_F", "Throw", "Put", "Rangefinder"};
		respawnWeapons = {"arifle_MX_Black_ACO_pointer_F", "hgun_P07_F", "Throw", "Put", "Rangefinder"};
	};

	class B_support_MG_F: B_Soldier_support_base_F {
		weapons = {"arifle_MXC_Black_Holo_pointer_F", "hgun_P07_F", "Throw", "Put"};
		respawnweapons = {"arifle_MXC_Black_Holo_pointer_F", "hgun_P07_F", "Throw", "Put"};
	};

	class B_support_GMG_F: B_Soldier_support_base_F {
		weapons = {"arifle_MXC_Black_Holo_pointer_F", "hgun_P07_F", "Throw", "Put"};
		respawnweapons = {"arifle_MXC_Black_Holo_pointer_F", "hgun_P07_F", "Throw", "Put"};
	};

	class B_support_Mort_F: B_Soldier_support_base_F {
		weapons = {"arifle_MXC_Black_Holo_pointer_F", "hgun_P07_F", "Throw", "Put"};
		respawnweapons = {"arifle_MXC_Black_Holo_pointer_F", "hgun_P07_F", "Throw", "Put"};
	};

	class B_support_AMG_F: B_Soldier_support_base_F {
		weapons = {"arifle_MXC_Black_Holo_pointer_F", "hgun_P07_F", "Throw", "Put"};
		respawnweapons = {"arifle_MXC_Black_Holo_pointer_F", "hgun_P07_F", "Throw", "Put"};
	};

	class B_support_AMort_F: B_Soldier_support_base_F {
		weapons = {"arifle_MXC_Black_Holo_pointer_F", "hgun_P07_F", "Throw", "Put"};
		respawnweapons = {"arifle_MXC_Black_Holo_pointer_F", "hgun_P07_F", "Throw", "Put"};
	};
};

class CfgWeapons {

	/*extern*/ class arifle_MX_SW_Black_F;

	class arifle_MX_SW_Black_Hamr_pointer_F: arifle_MX_SW_Black_F {
		author = "Antiflagellum";
		_generalMacro = "arifle_MX_SW_Black_Hamr_pointer_F";

		class LinkedItems {

			class LinkedItemsOptic {
				slot = "CowsSlot";
				item = "optic_Hamr";
			};

			class LinkedItemsAcc {
				slot = "PointerSlot";
				item = "acc_pointer_IR";
			};
			
			class LinkedItemsUnder
			{
				slot = "UnderBarrelSlot";
				item = "bipod_01_F_blk";
			};
		};
	};
	
	/*extern*/ class arifle_MX_GL_Black_F;

	class arifle_MX_GL_Black_Holo_pointer_snds_F: arifle_MX_GL_Black_F {
		author = "Antiflagellum";
		_generalMacro = "arifle_MX_GL_Black_Holo_pointer_snds_F";

		class LinkedItems {

			class LinkedItemsOptic {
				slot = "CowsSlot";
				item = "optic_Holosight";
			};

			class LinkedItemsAcc {
				slot = "PointerSlot";
				item = "acc_pointer_IR";
			};

			class LinkedItemsMuzzle {
				slot = "MuzzleSlot";
				item = "muzzle_snds_H";
			};
		};
	};
	
	class arifle_MX_GL_Black_ACO_pointer_F: arifle_MX_GL_Black_F {
		author = "Antiflagellum";
		_generalMacro = "arifle_MX_GL_Black_ACO_pointer_F";

		class LinkedItems {

			class LinkedItemsOptic {
				slot = "CowsSlot";
				item = "optic_ACO";
			};

			class LinkedItemsAcc {
				slot = "PointerSlot";
				item = "acc_pointer_IR";
			};
		};
	};
	
	/*extern*/ class arifle_MX_Black_F;
	
	class arifle_MX_Black_ACO_pointer_F: arifle_MX_Black_F {
		author = "Antiflagellum";
		_generalMacro = "arifle_MX_Black_ACO_pointer_F";

		class LinkedItems {

			class LinkedItemsOptic {
				slot = "CowsSlot";
				item = "optic_ACO";
			};

			class LinkedItemsAcc {
				slot = "PointerSlot";
				item = "acc_pointer_IR";
			};
		};
	};
	
	class arifle_MX_Black_ACO_pointer_snds_F: arifle_MX_Black_F {
		author = "Antiflagellum";
		_generalMacro = "arifle_MX_Black_ACO_pointer_snds_F";

		class LinkedItems {

			class LinkedItemsOptic {
				slot = "CowsSlot";
				item = "optic_ACO";
			};

			class LinkedItemsAcc {
				slot = "PointerSlot";
				item = "acc_pointer_IR";
			};
			
			class LinkedItemsMuzzle {
				slot = "MuzzleSlot";
				item = "muzzle_snds_H";
			};
		};
	};
	
	class arifle_MX_Black_RCO_pointer_snds_F: arifle_MX_Black_F {
		author = "Antiflagellum";
		_generalMacro = "arifle_MX_Black_RCO_pointer_snds_F";

		class LinkedItems {

			class LinkedItemsOptic {
				slot = "CowsSlot";
				item = "optic_Hamr";
			};

			class LinkedItemsAcc {
				slot = "PointerSlot";
				item = "acc_pointer_IR";
			};
			
			class LinkedItemsMuzzle {
				slot = "MuzzleSlot";
				item = "muzzle_snds_H";
			};
		};
	};
	
	/*extern*/ class arifle_MXC_Black_F;
	
	class arifle_MXC_Black_Holo_pointer_F: arifle_MXC_Black_F {
		author = "Antiflagellum";
		_generalMacro = "arifle_MXC_Black_Holo_pointer_F";

		class LinkedItems {

			class LinkedItemsOptic {
				slot = "CowsSlot";
				item = "optic_Holosight";
			};

			class LinkedItemsAcc {
				slot = "PointerSlot";
				item = "acc_pointer_IR";
			};
		};
	};
	
	class arifle_MXC_Black_ACO_pointer_snds_F: arifle_MXC_Black_F {
		author = "Antiflagellum";
		_generalMacro = "arifle_MXC_Black_ACO_pointer_snds_F";

		class LinkedItems {

			class LinkedItemsOptic {
				slot = "CowsSlot";
				item = "optic_ACO";
			};

			class LinkedItemsAcc {
				slot = "PointerSlot";
				item = "acc_pointer_IR";
			};

			class LinkedItemsMuzzle {
				slot = "MuzzleSlot";
				item = "muzzle_snds_H";
			};
		};
	};
	
	/*extern*/ class arifle_MXM_Black_F;
	
	class arifle_MXM_Black_RCO_pointer_F: arifle_MXM_Black_F {
		author = "Antiflagellum";
		_generalMacro = "arifle_MXM_Black_RCO_pointer_F";

		class LinkedItems {

			class LinkedItemsOptic {
				slot = "CowsSlot";
				item = "optic_Hamr";
			};

			class LinkedItemsAcc {
				slot = "PointerSlot";
				item = "acc_pointer_IR";
			};
			
			class LinkedItemsUnder
			{
				slot = "UnderBarrelSlot";
				item = "bipod_01_F_blk";
			};
		};
	};
	
	class arifle_MXM_Black_RCO_pointer_snds_F: arifle_MXM_Black_F {
		author = "Antiflagellum";
		_generalMacro = "arifle_MXM_Black_RCO_pointer_snds_F";

		class LinkedItems {

			class LinkedItemsOptic {
				slot = "CowsSlot";
				item = "optic_Hamr";
			};

			class LinkedItemsAcc {
				slot = "PointerSlot";
				item = "acc_pointer_IR";
			};
			
			class LinkedItemsUnder
			{
				slot = "UnderBarrelSlot";
				item = "bipod_01_F_blk";
			};
			
			class LinkedItemsMuzzle {
				slot = "MuzzleSlot";
				item = "muzzle_snds_H";
			};
		};
	};
	
	/*extern*/ class MMG_02_black_F;
	
	class arifle_MMG_02_black_RCO_pointer_F: MMG_02_black_F {
		author = "Antiflagellum";
		_generalMacro = "arifle_MMG_02_black_RCO_pointer_F";

		class LinkedItems {

			class LinkedItemsOptic {
				slot = "CowsSlot";
				item = "optic_Hamr";
			};

			class LinkedItemsAcc {
				slot = "PointerSlot";
				item = "acc_pointer_IR";
			};
			
			class LinkedItemsUnder
			{
				slot = "UnderBarrelSlot";
				item = "bipod_01_F_blk";
			};
		};
	};
	
	/*extern*/ class srifle_DMR_02_F;
	
	class srifle_DMR_02_Black_RCO_pointer_snds_F: srifle_DMR_02_F {
		author = "Antiflagellum";
		_generalMacro = "srifle_DMR_02_Black_RCO_pointer_snds_F";

		class LinkedItems {

			class LinkedItemsOptic {
				slot = "CowsSlot";
				item = "optic_AMS";
			};

			class LinkedItemsAcc {
				slot = "PointerSlot";
				item = "acc_pointer_IR";
			};

			class LinkedItemsMuzzle {
				slot = "MuzzleSlot";
				item = "muzzle_snds_338_black";
			};
			
			class LinkedItemsUnder
			{
				slot = "UnderBarrelSlot";
				item = "bipod_01_F_blk";
			};
		};
	};
};


Author Message


Posts: 1189
Rank:


Level: Member

Country: tr
Location:
Occupation: Computer Science student
Age: 23
In-game name: Wak

 
#2 Posted at 2015-09-10 12:43        
     
First, I just want to mention that you're amazing. You actually picked the right code tag for a config, and explained your problem as well as the ways you tried to fix it. Always good to see people are trying to learn instead of coming here with copy-pasted shit.

Your problem is that you don't define "weapons" and "respawnWeapons" as arrays. Anything in a C++ code (Also C#/Java etc.) wrapped around "{" and "}" symbols are arrays. You need to define these arrays by putting "[]" at the end of the variable name. Just like the ones you did in CfgPatches. For example:
myVar = {0, 1, 2};

This will produce the same error you're getting, myVar is not an array therefore it can not store the array value of {0, 1, 2}

myArray[] = {"hello", "I work completely fine"};

You'll basically need to replace every "weapons" and "respawnWeapons" in the CfgVehicles class with array types.


This post was edited by 654wak654 (2015-09-10 15:13, ago)

Sometimes I like to think as I started the whole "earplugs" thing.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

#define getDamage getDammage

Advertisement


Author Message


Posts: 7
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2015-09-10 16:47        
     
Wow I knew it was something stupidly simple. I was so hung up on it being the first weapons array that I didn't even think to check the other 30+ weapons arrays. Thanks for the fresh set of eyes 654wak654.