CfgVehicles.hpp error upon startup

  1. last year

    So I've been trying to export factions crates with my custom faction created through ORBAT. After following the instructions and pasting the correct data into config.cpp and CfgVehicles.hpp, I receive an error upon startup. The ARMA 3 log error shows:

    12:36:35 Error context CUP_30Rnd_545x39_AK_M,50);
    12:36:35 ErrorMessage: File osovarmydes\CfgVehicles.hpp, line 2639: '/O_SOVARMY_DES_AmmoBox/TransportMagazines.mag_xx': '(' encountered instead of '='

    In my CfgVehicles.hpp file, the crates section is as followed:

    class Box_East_Ammo_F; // CUP_RUBasicAmmunitionBox
        class Box_NATO_Ammo_F; // CUP_USBasicAmmunitionBox
        class Box_East_Wps_F; // CUP_RUBasicWeaponsBox
        class Box_NATO_Wps_F; // CUP_USBasicWeaponsBox
        class Box_East_Support_F; // CUP_RUSpecialWeaponsBox
        class Box_NATO_Support_F; // CUP_USSpecialWeaponsBox
        class Box_East_WpsLaunch_F; // CUP_RULaunchersBox
        class Box_NATO_WpsLaunch_F; // CUP_USLaunchersBox
        class Box_East_Uniforms_F; // CUP_RUBasicWeaponsBox
        class Box_NATO_Uniforms_F; // CUP_USBasicWeaponsBox
        class O_SupplyCrate_F; // CUP_RUVehicleBox
        class B_SupplyCrate_F; // CUP_USVehicleBox
    
        class O_SOVARMY_DES_AmmoBox : Box_East_Ammo_F {
            author = ALiVE ORBAT CREATOR;
            displayName = Soviet Armed Forces (Arid/Desert) Ammo Box;
            class TransportMagazines {
                mag_xx(CUP_HandGrenade_RGD5,50);
                mag_xx(CUP_30Rnd_545x39_AK_M,50);
                mag_xx(SmokeShell,50);
                mag_xx(CUP_PG7V_M,50);
                mag_xx(CUP_1Rnd_HE_GP25_M,50);
                mag_xx(CUP_1Rnd_SMOKE_GP25_M,50);
                mag_xx(CUP_45Rnd_TE4_LRT4_Green_Tracer_545x39_RPK_M,50);
                mag_xx(CUP_100Rnd_TE4_LRT4_762x54_PK_Tracer_Red_M,50);
                mag_xx(CUP_RPG18_M,50);
                mag_xx(CUP_10Rnd_762x54_SVD_M,50);
                mag_xx(CUP_30Rnd_545x39_AK74_plum_M,50);
                mag_xx(CUP_PipeBomb_M,50);
                mag_xx(APERSTripMine_Wire_Mag,50);
                mag_xx(APERSMine_Range_Mag,50);
                mag_xx(DemoCharge_Remote_Mag,50);
                mag_xx(CUP_8Rnd_9x18_Makarov_M,50);
            };
            class TransportWeapons {
            };
            class TransportItems {
            };
        };
        class O_SOVARMY_DES_WeaponsBox : Box_East_Wps_F {
            author = ALiVE ORBAT CREATOR;
            displayName = Soviet Armed Forces (Arid/Desert) Weapons Box;
            class TransportMagazines {
                mag_xx(CUP_30Rnd_545x39_AK_M,50);
                mag_xx(CUP_1Rnd_HE_GP25_M,50);
                mag_xx(CUP_45Rnd_TE4_LRT4_Green_Tracer_545x39_RPK_M,50);
                mag_xx(CUP_100Rnd_TE4_LRT4_762x54_PK_Tracer_Green_M,50);
                mag_xx(CUP_10Rnd_762x54_SVD_M,50);
                mag_xx(CUP_30Rnd_545x39_AK74_plum_M,50);
                mag_xx(CUP_8Rnd_9x18_Makarov_M,50);
            };
            class TransportWeapons {
                weap_xx(CUP_arifle_AK74_Early,10);
                weap_xx(CUP_arifle_AK74_GL_Early,10);
                weap_xx(CUP_arifle_RPK74_45,10);
                weap_xx(CUP_lmg_PKM,10);
                weap_xx(CUP_srifle_SVD,10);
                weap_xx(CUP_arifle_AKS74U,10);
                weap_xx(CUP_hgun_Makarov,10);
            };
            class TransportItems {
                item_xx(CUP_optic_PSO_1_1_open,10);
            };
        };
        class O_SOVARMY_DES_LaunchersBox : Box_East_WpsLaunch_F {
            author = ALiVE ORBAT CREATOR;
            displayName = Soviet Armed Forces (Arid/Desert) Launchers Box;
            class TransportMagazines {
                mag_xx(CUP_PG7V_M,5);
                mag_xx(CUP_RPG18_M,5);
            };
            class TransportWeapons {
                weap_xx(CUP_launch_RPG7V,5);
                weap_xx(CUP_launch_RPG18,5);
            };
            class TransportItems {
            };
        };
        class O_SOVARMY_DES_UniformBox : Box_East_Uniforms_F {
            author = ALiVE ORBAT CREATOR;
            displayName = Soviet Armed Forces (Arid/Desert) Uniform Box;
            class TransportWeapons {
            };
            class TransportMagazines {
            };
            class TransportItems {
                item_xx(CUP_U_O_RUS_M88_MSV,15);
            };
        };
        class O_SOVARMY_DES_SupportBox : Box_East_Support_F {
            author = ALiVE ORBAT CREATOR;
            displayName = Soviet Armed Forces (Arid/Desert) Support Box;
            class TransportWeapons {
            };
            class TransportMagazines {
            };
            class TransportItems {
                item_xx(CFP_AK_VEST,10);
                item_xx(SP_SSh68Helmet_Green1,10);
                item_xx(ItemMap,10);
                item_xx(ItemCompass,10);
                item_xx(ItemWatch,10);
                item_xx(ItemRadio,10);
                item_xx(CUP_G_Squares,10);
                item_xx(CUP_B_RPGPack_Khaki,10);
                item_xx(SP_PatrolCap_Tan,10);
                item_xx(CUP_G_Bandanna_aviator,10);
                item_xx(CUP_B_AlicePack_Khaki,10);
                item_xx(SP_BoonieHat_Tan,10);
                item_xx(CUP_G_Shades_Blue,10);
                item_xx(CFP_AK_VEST_Tan,10);
                item_xx(CUP_G_Bandanna_oli,10);
                item_xx(CUP_G_Bandanna_khk,10);
                item_xx(CUP_G_Bandanna_blk,10);
                item_xx(Binocular,10);
                item_xx(SP_SSh68Helmet_Green2,10);
                item_xx(SP_Beret2_Red,10);
                item_xx(CUP_H_C_Ushanka_01,10);
                item_xx(SP_SPH4Helmet_Green,10);
                item_xx(CUP_B_Podnos_Bipod_Bag,10);
                item_xx(CUP_B_Podnos_Gun_Bag,10);
                item_xx(CUP_B_DShkM_TripodLow_Bag,10);
                item_xx(CUP_B_DShkM_TripodHigh_Bag,10);
                item_xx(CUP_B_DShkM_Gun_Bag,10);
                item_xx(CUP_B_SPG9_Tripod_Bag,10);
                item_xx(CUP_B_SPG9_Gun_Bag,10);
            };
        };
        class O_SOVARMY_DES_SupplyBox : O_SupplyCrate_F {
            author = ALiVE ORBAT CREATOR;
            displayName = Soviet Armed Forces (Arid/Desert) Supply Box;
            class TransportMagazines {
                mag_xx(CUP_HandGrenade_RGD5,50);
                mag_xx(CUP_30Rnd_545x39_AK_M,50);
                mag_xx(SmokeShell,50);
                mag_xx(CUP_PG7V_M,50);
                mag_xx(CUP_1Rnd_HE_GP25_M,50);
                mag_xx(CUP_1Rnd_SMOKE_GP25_M,50);
                mag_xx(CUP_45Rnd_TE4_LRT4_Green_Tracer_545x39_RPK_M,50);
                mag_xx(CUP_100Rnd_TE4_LRT4_762x54_PK_Tracer_Red_M,50);
                mag_xx(CUP_RPG18_M,50);
                mag_xx(CUP_10Rnd_762x54_SVD_M,50);
                mag_xx(CUP_30Rnd_545x39_AK74_plum_M,50);
                mag_xx(CUP_PipeBomb_M,50);
                mag_xx(APERSTripMine_Wire_Mag,50);
                mag_xx(APERSMine_Range_Mag,50);
                mag_xx(DemoCharge_Remote_Mag,50);
                mag_xx(CUP_8Rnd_9x18_Makarov_M,50);
            };
            class TransportWeapons {
                weap_xx(CUP_arifle_AK74_Early,10);
                weap_xx(CUP_arifle_AK74_GL_Early,10);
                weap_xx(CUP_arifle_RPK74_45,10);
                weap_xx(CUP_lmg_PKM,10);
                weap_xx(CUP_srifle_SVD,10);
                weap_xx(CUP_arifle_AKS74U,10);
                weap_xx(CUP_hgun_Makarov,10);
                weap_xx(CUP_launch_RPG7V,10);
                weap_xx(CUP_launch_RPG18,10);
            };
            class TransportItems {
                item_xx(CUP_optic_PSO_1_1_open,10);
                item_xx(CFP_AK_VEST,10);
                item_xx(SP_SSh68Helmet_Green1,10);
                item_xx(ItemMap,10);
                item_xx(ItemCompass,10);
                item_xx(ItemWatch,10);
                item_xx(ItemRadio,10);
                item_xx(CUP_G_Squares,10);
                item_xx(CUP_B_RPGPack_Khaki,10);
                item_xx(SP_PatrolCap_Tan,10);
                item_xx(CUP_G_Bandanna_aviator,10);
                item_xx(CUP_B_AlicePack_Khaki,10);
                item_xx(SP_BoonieHat_Tan,10);
                item_xx(CUP_G_Shades_Blue,10);
                item_xx(CFP_AK_VEST_Tan,10);
                item_xx(CUP_G_Bandanna_oli,10);
                item_xx(CUP_G_Bandanna_khk,10);
                item_xx(CUP_G_Bandanna_blk,10);
                item_xx(Binocular,10);
                item_xx(SP_SSh68Helmet_Green2,10);
                item_xx(SP_Beret2_Red,10);
                item_xx(CUP_H_C_Ushanka_01,10);
                item_xx(SP_SPH4Helmet_Green,10);
                item_xx(CUP_B_Podnos_Bipod_Bag,10);
                item_xx(CUP_B_Podnos_Gun_Bag,10);
                item_xx(CUP_B_DShkM_TripodLow_Bag,10);
                item_xx(CUP_B_DShkM_TripodHigh_Bag,10);
                item_xx(CUP_B_DShkM_Gun_Bag,10);
                item_xx(CUP_B_SPG9_Tripod_Bag,10);
                item_xx(CUP_B_SPG9_Gun_Bag,10);
                item_xx(CUP_U_O_RUS_M88_MSV,10);
            };
        };

    Has anyone encountered a similar error before? And if so, is there a possible work around or fix?
    Many thanks.

  2. Edited last year by marceldev89

    Seems like you're missing an include in your .hpp file for the macros.
    Did you copy those macros to config.cpp?

  3. @marceldev89 Seems like you're missing an include in your .hpp file for the macros.
    Did you copy those macros to config.cpp?

    Solved the problem.

    It seems as though the macros for the config.cpp need to be included in the CfgVehicles.hpp too. Of course now I’m having the issue of being unable to execute the code in staticData.sqf. (No crates appearing and having the issue of vanilla logistics vehicles again)

  4. Edited last year by DidNothing

    @Guitar18 Solved the problem.

    It seems as though the macros for the config.cpp need to be included in the CfgVehicles.hpp too. Of course now I’m having the issue of being unable to execute the code in staticData.sqf. (No crates appearing and having the issue of vanilla logistics vehicles again)

    Exact same issue here too, crashes when supposedly done right and doesn't work when done with the defines in the .hpp.
    Part of the config below. What's causing it to give errors is beyond me.

        class Box_NATO_Ammo_F;
        class Box_NATO_Wps_F;
        class Box_NATO_WpsLaunch_F;
        class Box_NATO_Uniforms_F;
        class Box_NATO_Support_F;
        class B_SupplyCrate_F;
    
        class I_CX_AmmoBox : Box_NATO_Ammo_F {
            author = ALiVE ORBAT CREATOR;
            displayName = Group Ammo Box;
            class TransportMagazines {
                mag_xx(hlc_24Rnd_75x55_B_stgw,50);
                mag_xx(hlc_13Rnd_9x19_B_P228,50);
                mag_xx(rhs_mag_m67,50);
                mag_xx(UK3CB_BAF_SmokeShell,50);
                mag_xx(UK3CB_BAF_SmokeShellRed,50);
                mag_xx(hlc_24Rnd_75x55_T_stgw,50);
                mag_xx(rhs_mag_an_m8hc,50);
                mag_xx(Chemlight_blue,50);
                mag_xx(hlc_30Rnd_556x45_EPR_sg550,50);
                mag_xx(1Rnd_HE_Grenade_shell,50);
                mag_xx(1Rnd_Smoke_Grenade_shell,50);
                mag_xx(UGL_FlareRed_F,50);
                mag_xx(BWA3_Fliegerfaust_Mag,50);
                mag_xx(hlc_15Rnd_9x19_B_P226,50);
                mag_xx(APERSTripMine_Wire_Mag,50);
                mag_xx(ClaymoreDirectionalMine_Remote_Mag,50);
                mag_xx(APERSMine_Range_Mag,50);
                mag_xx(KA_G11_45rnd_Caseless_mag,50);
                mag_xx(hlc_200rnd_556x45_M_SAW,50);
                mag_xx(BWA3_CarlGustav_HEAT,50);
                mag_xx(BWA3_CarlGustav_HE,50);
                mag_xx(DemoCharge_Remote_Mag,50);
                mag_xx(SatchelCharge_Remote_Mag,50);
                mag_xx(hlc_10Rnd_357SIG_B_P229,50);
                mag_xx(hlc_12Rnd_357SIG_B_P226,50);
                mag_xx(Chemlight_yellow,50);
                mag_xx(UK3CB_BAF_SmokeShellYellow,50);
                mag_xx(KKiv_Mag_HEDP,50);
                mag_xx(KKiv_Mag_APFSDS,50);
            };
            class TransportWeapons {
            };
            class TransportItems {
            };
        };
  5. I'll pass it over to the CFP boys, they know the tool pretty good by now. ^^

    @Tupolov @AUTigerGrad and @SpyderBlack723 for good measure.

  6. I cross posted to the Discord

  7. Found a solution to that error you guys are having. Been making 2 new factions with Orbat recently and I just ran into the same error as you with the crates code. I took a quick look over on the CFP github to see how their crates were setup and to compare with mine.

    The following lines are not in their config.cpp but they put it instead at the top of the cfgvehicles:

    // Copy this part to your config.cpp
    #define mag_xx(a,b) class _xx_##a {magazine = ##a; count = b;}
    #define weap_xx(a,b) class _xx_##a {weapon = ##a; count = b;}
    #define item_xx(a,b) class _xx_##a {name = a; count = b;}

    I removed that part from the config.cpp and put it on top of the cfgvehicles (which should be in your autogen.hpp) and the file load without error anymore, and the crates worked perfectly in game.

  8. Hey thanks for posting the solution. Does this need to be fixed on our end? @Hoot

  9. @HeroesandvillainsOS Hey no problem. You mean fixed on Alive's end? If so then, to be honest I don't know much about scripting and configs, and I have no idea why putting the #define lines in the config.cpp, as per the instructions, would throw an error. I guess it used to work that way before (otherwise the instruction line would obviously not say to copy the lines in config.cpp) but I can't say if this error is due to the latest Alive or game updates as this was the 1st time I tried to create the crates with Orbat. Also I was running a whole bunch of mods, so it's hard for me to say if this error is only due to Alive.
    One thing's for sure, the CFP team put those lines in their cfgvehicles and not in the config.cpp, they will certainly know more about this than me, and will probably be able to tell why and what could cause this error.
    A small fix Alive could do I guess, would be to just change that specific instructions line in the "crates code" whenever it's exported from the Orbat tool. And change it to say "copy this part in cfgVehicles" instead of the config.cpp .
    I wish I could be of more help, pinpoiting the exact issue but this is way beyond my knowledge to be frank.

 

or Sign Up to reply!