CBATeam / CBA_A3

Community Base Addons for Arma 3
https://github.com/CBATeam/CBA_A3/wiki
GNU General Public License v2.0
364 stars 149 forks source link

Functions are inaccessible in Eden if RECOMPILE is defined on game start #1336

Open Dystopian opened 4 years ago

Dystopian commented 4 years ago

Mods (complete and add to the following information):

Description: Sometimes you need CBA functions in Eden editor (e.g. in Debug console). Also sometimes RECOMPILE is needed to edit functions while game is running. But when RECOMPILE is defined in x\cba\addons\main\script_mod.hpp on game start the functions are not compiled to missionNamespace and can't be used in console by name. They are compiled to uiNamespace only. Also this prevents ACE Arsenal working in Eden editor.

Steps to reproduce:

Expected behavior: Functions should exist in missionNamespace.

Where did the issue occur?

Log Files:

commy2 commented 4 years ago

Also this prevents ACE Arsenal working in Eden editor.

But only if RECOMPILE is set?

Dystopian commented 4 years ago

But only if RECOMPILE is set?

yes, and only on game start

commy2 commented 4 years ago

But all RECOMPILE does is set the recompile token to 1 in CfgFunctions. How, when and if a CfgFunctions function like CBA_fnc_leftTrim is compiled is up to BI and \a3\functions_f\initFunctions.sqf. Idk what to do about that. I'd say you should use PREP().