Pablo Diablo 1 Posted April 17, 2020 Hello all. I'm a non-coder, trying to figure this out, and have put together my first ever patch, to change a loadout in ITC's SPHs. I've got 99% of it ironed out, but am running into an issue where I get an error in CBA every time I load a mission with it included - trying to polish this to use w/ Zeus-based MP server, and would love to eliminate this error. Here's the relevant error section from the RPT. This repeats several 10's of times, over a couple seconds. 23:01:10 Error in expression <ba_settings_fnc_openSettingsMenu'] call SLX_XEH_COMPILE_NEW; ['\x\cba\addons\set> 23:01:10 Error position: <SLX_XEH_COMPILE_NEW; ['\x\cba\addons\set> 23:01:10 Error Undefined variable in expression: slx_xeh_compile_new 23:01:10 File \x\cba\addons\settings\fnc_addSetting.sqf [CBA_fnc_addSetting]..., line 5634 23:01:10 Error in expression <nit.sqf', 'cba_settings_fnc_init'] call SLX_XEH_COMPILE_NEW; ['\x\cba\addons\set> 23:01:10 Error position: <SLX_XEH_COMPILE_NEW; ['\x\cba\addons\set> 23:01:10 Error Undefined variable in expression: slx_xeh_compile_new 23:01:10 File \x\cba\addons\settings\fnc_addSetting.sqf [CBA_fnc_addSetting]..., line 5622 23:01:10 Error in expression < call SLX_XEH_COMPILE_NEW; }; }; call cba_settings_fnc_init == 0 }> 23:01:10 Error position: <cba_settings_fnc_init == 0 }> 23:01:10 Error Undefined variable in expression: cba_settings_fnc_init 23:01:10 File \x\cba\addons\settings\fnc_addSetting.sqf [CBA_fnc_addSetting]..., line 5655 And here's the fairly simple cfgVehicles.hpp (called with an #include from the Config.cpp) /// Magazines macros definition /// #define mag_2(a) a, a #define mag_3(a) a, a, a #define mag_4(a) a, a, a, a #define mag_5(a) a, a, a, a, a #define mag_6(a) a, a, a, a, a, a #define mag_7(a) a, a, a, a, a, a, a #define mag_8(a) a, a, a, a, a, a, a, a #define mag_9(a) a, a, a, a, a, a, a, a, a #define mag_10(a) a, a, a, a, a, a, a, a, a, a #define mag_11(a) a, a, a, a, a, a, a, a, a, a, a #define mag_12(a) a, a, a, a, a, a, a, a, a, a, a, a #define mag_15(a) a, a, a, a, a, a, a, a, a, a, a, a, a, a, a #define mag_20(a) a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a #define mag_24(a) a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a #define mag_30(a) a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a #define mag_35(a) a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a class CfgVehicles { class LandVehicle; class Tank: LandVehicle {}; class Tank_F:Tank { class Turrets { class MainTurret {}; }; }; class MBT_01_base_F:Tank_F { class Turrets: Turrets { class MainTurret: MainTurret {}; }; }; class MBT_01_arty_base_F:MBT_01_base_F { class Turrets: Turrets { class MainTurret: MainTurret {}; }; }; class B_MBT_01_arty_base_F:MBT_01_arty_base_F { class Turrets:Turrets { class MainTurret:MainTurret {}; }; }; class itc_land_SPH01_base:B_MBT_01_arty_base_F { class Turrets:Turrets { class MainTurret:MainTurret { //animationSourceBody = "turret_source"; //animationSourceGun = "gun_source"; turretInfoType = "ITC_Land_RscIGS_SPH"; weapons[] = {"itc_land_155mm_howitzer"}; magazines[] = { mag_35("itc_land_g155hex"), mag_10("itc_land_g155smo"), mag_5("itc_land_g155ill"), mag_10("itc_land_g155lgm"), mag_10("itc_land_g155pgm"), mag_5("itc_land_g155map"), mag_10("itc_land_g155mat") }; }; }; }; class itc_land_b_SPH_Sholef2:itc_land_SPH01_base { class Turrets:Turrets { class MainTurret:MainTurret { //animationSourceBody = "turret_source"; //animationSourceGun = "gun_source"; //turretInfoType = "ITC_Land_RscIGS_SPH"; //weapons[] = {"itc_land_155mm_howitzer"}; magazines[] = { mag_35("itc_land_g155hex"), mag_10("itc_land_g155smo"), mag_5("itc_land_g155ill"), mag_10("itc_land_g155lgm"), mag_10("itc_land_g155pgm"), mag_5("itc_land_g155map"), mag_10("itc_land_g155mat") }; }; }; }; class itc_land_b_t_SPH_Sholef2:itc_land_b_SPH_Sholef2 { class Turrets:Turrets { class MainTurret:MainTurret { //animationSourceBody = "turret_source"; //animationSourceGun = "gun_source"; //turretInfoType = "ITC_Land_RscIGS_SPH"; //weapons[] = {"itc_land_155mm_howitzer"}; //magazines[] = { // mag_35("itc_land_g155hex"), // mag_10("itc_land_g155smo"), // mag_5("itc_land_g155ill"), // mag_10("itc_land_g155lgm"), // mag_10("itc_land_g155pgm"), // mag_5("itc_land_g155map"), // mag_10("itc_land_g155mat") //}; }; }; }; }; You'll note I've commented out some strings, trying to figure out what I can cut from the file, and what needs to stay - the last two classes at the end ("...b_SPH..." and "...b_t_SPH..." weren't changing when I put their parent class in (itc_land_SPH01_base), so there's an inheritance issue somewhere, but I was able to get it to work. Less concerned about that (I can do iterative revisions to figure it out) and more concerned about the CBA errors. Any thoughts as to what might be causing the CBA error, or resources I can dig into to figure it out, are all appreciated. Thanks in advance! Share this post Link to post Share on other sites
56Curious 23 Posted April 18, 2020 call cba_settings_fnc_init == 0 }> 23:01:10 Error position: <cba_settings_fnc_init == 0 Why is it calling a function but also checking if its equal to 0 at the same time, unless i'm wrong here? aha Share this post Link to post Share on other sites
Pablo Diablo 1 Posted April 21, 2020 Well, I'm not sure. I have no idea what would make cba call a function like that ... but it only happens when I have the mod/patch loaded. The first line: "call SLX_XEH_COMPILE_NEW;" makes me think that it's a new function (....about this mod, perhaps?), but then why the undefined variable and '== 0' bits are popping up is beyond my limited knowledge. And because I realized that I didn't include the config.cpp (which is the other important piece of the puzzle) - mostly copy-pasted from the original .ccp file, with a couple tweaks: class CfgPatches { class PablosSholefModLite {}; class itc_land_155mm {}; class itc_land_veh_sholef { units[] = { "itc_land_b_SPH_Sholef2","itc_land_b_t_SPH_Sholef2" }; weapons[] = {}; requiredVersion = 1.8; requiredAddons[] = {"A3_Weapons_F","A3_Armor_F_Gamma_MBT_01","itc_land_veh_sights","itc_land_veh_weapons","itc_land_sphammohandler"}; author = "ITC Addons Team"; authors[] = {"ToadBall","Yax"}; }; }; #include "CfgVehicles.hpp" I thought you had to call out the name of the pbo as a class (i.e. "PablosSholefModLite"), but maybe it's a self-referential problem? Share this post Link to post Share on other sites