Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Dystopian opened this issue May 14, 2020 · 3 comments · May be fixed by #1337
Open

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

Dystopian opened this issue May 14, 2020 · 3 comments · May be fixed by #1337
Assignees
Milestone

Comments

@Dystopian
Copy link
Contributor

Mods (complete and add to the following information):

  • Arma 3: 1.98 stable
  • CBA: 3.15.1 dev 5c478a099b0954baf1c0b085861978e52847ce9b

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:

  • define RECOMPILE in x\cba\addons\main\script_mod.hpp;
  • start game with filepatching;
  • open Eden editor, open console;
  • put CBA_fnc_leftTrim, missionNamespace getVariable "CBA_fnc_leftTrim", uiNamespace getVariable "CBA_fnc_leftTrim" to watch fields. Function exists in uiNamespace and doesn't exist in missionNamespace or by name.

Expected behavior:
Functions should exist in missionNamespace.

Where did the issue occur?

  • Editor (Singleplayer)

Log Files:

@Dystopian Dystopian added the Bug label May 14, 2020
@commy2
Copy link
Contributor

commy2 commented May 14, 2020

Also this prevents ACE Arsenal working in Eden editor.

But only if RECOMPILE is set?

@Dystopian
Copy link
Contributor Author

But only if RECOMPILE is set?

yes, and only on game start

@commy2
Copy link
Contributor

commy2 commented May 15, 2020

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().

@commy2 commy2 added this to the 3.15.2 milestone May 15, 2020
@PabstMirror PabstMirror modified the milestones: 3.15.2, Ongoing Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants