maxjoiner 284 Posted September 1, 2016 Hi all, I'm developing a Shotgun addon, after the last ArmA3 update, I have this error: and this other error only if You use also my Life Pack: this is my config: class cfgpatches { class shootgun { units[] = {}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"A3_weapons_f","A3_Weapons_F_Acc"}; }; }; #include "CfgAmmo.hpp" #include "CfgMagazines.hpp" #include "CfgWeapons.hpp" enum { destructengine=2, destructdefault=6, destructwreck=7, destructtree=3, destructtent=4, stabilizedinaxisx=1, stabilizedinaxesxyz=4, stabilizedinaxisy=2, stabilizedinaxesboth=3, destructno=0, stabilizedinaxesnone=0, destructman=5, destructbuilding=1 }; //CfgWeapons.hpp class Single; //class Mode_SemiAuto; //class Mode_Burst; //class Mode_FullAuto; //class FullAuto; class SlotInfo; class CowsSlot; class PointerSlot; class CfgWeapons { class WeaponSlotsInfo { allowedslots[] = {901}; mass = 4; class MuzzleSlot: SlotInfo { displayname = "$str_a3_cfgweapons_abr_base_f_weaponslotsinfo_muzzleslot0"; linkproxy = "\A3\data_f\proxies\weapon_slots\MUZZLE"; }; class CowsSlot: CowsSlot { }; class PointerSlot: PointerSlot { }; }; class mk20_base_F; class Max_Shotgun_classic: mk20_base_F { scope = 2; model = "\shootgun\shootgun.p3d"; displayName = "Shotgun (Classic)"; author = "Maxjoiner"; descriptionshort = "Classic Shotgun<br />Caliber: 12mm"; picture = "\shootgun\data\shootgun_ca.paa"; handanim[] = {"OFP2_ManSkeleton", "\shootgun\anim\M24.rtm"}; magazines[] = {"MAX_6Rnd_Cal12"}; reloadaction = "GestureReloadEBR"; dexterity = 1.8; class WeaponSlotsInfo: WeaponSlotsInfo { mass = 120; class MuzzleSlot: SlotInfo { linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE"; compatibleItems[] = {"muzzle_snds_M"}; }; class CowsSlot: CowsSlot { access = 1; compatibleitems[] = {"optic_Arco", "optic_aco", "optic_ACO_grn", "optic_hamr", "optic_Holosight", "optic_MRCO"}; displayname = "Optics Slot"; linkproxy = "\A3\data_f\proxies\weapon_slots\TOP"; scope = 0; }; class PointerSlot: PointerSlot { compatibleItems[] = {}; }; }; modes[] = {"Single"}; //reloadmagazinesound[] = {"\shootgun\sound\M1014-reload", 0.0562341, 1, 20}; //value = 2; class Single: Single { begin1[] = {"shootgun\sound\sniper_single_03", 1.77828, 1, 1000}; begin2[] = {"shootgun\sound\sniper_single_03", 1.77828, 1, 1000}; dispersion = 0.00175; maxrange = 300; maxrangeprobab = 0.05; midrange = 150; midrangeprobab = 0.7; minrange = 2; minrangeprobab = 0.3; reloadtime = 1; soundbegin[] = {"begin1", 0.5, "begin2", 0.5}; recoil = "recoil_single_primary_3outof10"; recoilprone = "recoil_single_primary_prone_3outof10"; }; }; class Max_Shotgun_police: max_shotgun_classic { scope = 2; model = "\shootgun\shootgun1.p3d"; displayName = "Shotgun (Police)"; author = "Maxjoiner"; descriptionshort = "Police Shotgun<br />Caliber: 12mm"; picture = "\shootgun\data\shootgun_ca.paa"; }; class Max_Shotgun_SB: max_shotgun_classic { scope = 2; model = "\shootgun\shootgun2.p3d"; displayName = "Shotgun (Short Barrel)"; author = "Maxjoiner"; descriptionshort = "Short Barrel Shotgun<br />Caliber: 12mm"; picture = "\shootgun\data\shootgun_ca.paa"; handAnim[]={}; }; }; However despite the errors messages the shotgun works fine... Any Idea? Share this post Link to post Share on other sites
maxjoiner 284 Posted September 3, 2016 Nobody can help me?! :cry2: Share this post Link to post Share on other sites
UK_Apollo 476 Posted September 3, 2016 Look for .kju's post #6 on the following thread. He gives an example of correct inheritance to fix this problem. https://forums.bistudio.com/topic/192259-config-errors-displaying/#entry3056311 "inheritance definitions need to be defined in the scope the class has originally been defined." 1 Share this post Link to post Share on other sites
maxjoiner 284 Posted September 3, 2016 Thanks mate, just possible I'll study the @kju's post #6 ;) Share this post Link to post Share on other sites
maxjoiner 284 Posted September 5, 2016 Solved! ;) new config: //CfgWeapons.hpp class CfgWeapons { class mk20_base_F; class max_shotgun_base : mk20_base_F { class WeaponSlotsInfo; class Single; class Mode_SemiAuto; class Mode_Burst; class Mode_FullAuto; class FullAuto; class SlotInfo; class CowsSlot; class PointerSlot; }; class Max_Shotgun_classic: max_shotgun_base { scope = 2; model = "\shootgun\shootgun.p3d"; displayName = "Shotgun (Classic)"; author = "Maxjoiner"; descriptionshort = "Classic Shotgun<br />Caliber: 12mm"; picture = "\shootgun\data\classic_ca.paa"; handanim[] = {"OFP2_ManSkeleton", "\shootgun\anim\M24.rtm"}; magazines[] = {"MAX_6Rnd_Cal12"}; reloadaction = "ReloadMagazine"; dexterity = 1.8; class WeaponSlotsInfo { allowedslots[] = {901}; mass = 120; class MuzzleSlot: SlotInfo { linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE"; compatibleItems[] = {"muzzle_snds_M"}; }; class CowsSlot: CowsSlot { access = 1; compatibleitems[] = {"optic_Arco", "optic_aco", "optic_ACO_grn", "optic_hamr", "optic_Holosight", "optic_MRCO"}; displayname = "Optics Slot"; linkproxy = "\A3\data_f\proxies\weapon_slots\TOP"; scope = 0; }; class PointerSlot: PointerSlot { compatibleItems[] = {"acc_flashlight","acc_pointer_IR"};//"acc_flashlight","acc_pointer_IR" }; }; modes[] = {"Single"}; reloadmagazinesound[] = {"shootgun\sound\M1014-reload", 2, 1, 20};//0.0562341, 1, 20 value = 2; class Single : single { begin1[] = {"shootgun\sound\sniper_single_03", 1.77828, 1, 1000}; begin2[] = {"shootgun\sound\sniper_single_03", 1.77828, 1, 1000}; dispersion = 0.00175; maxrange = 300; maxrangeprobab = 0.05; midrange = 150; midrangeprobab = 0.7; minrange = 2; minrangeprobab = 0.3; reloadtime = 1; soundbegin[] = {"begin1", 0.5, "begin2", 0.5}; recoil = "recoil_single_primary_3outof10"; recoilprone = "recoil_single_primary_prone_3outof10"; }; }; class Max_Shotgun_police: max_shotgun_classic { scope = 2; model = "\shootgun\shootgun1.p3d"; displayName = "Shotgun (Police)"; author = "Maxjoiner"; descriptionshort = "Police Shotgun<br />Caliber: 12mm"; picture = "\shootgun\data\police_ca.paa"; }; class Max_Shotgun_SB: max_shotgun_classic { scope = 2; model = "\shootgun\shootgun2.p3d"; displayName = "Shotgun (Short Barrel)"; author = "Maxjoiner"; descriptionshort = "Short Barrel Shotgun<br />Caliber: 12mm"; picture = "\shootgun\data\shootgun_ca.paa"; handAnim[]={}; }; }; Share this post Link to post Share on other sites