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

[Feature] Support CfgFunctions natively #195

Open
DarkWanderer opened this issue Feb 12, 2022 · 3 comments
Open

[Feature] Support CfgFunctions natively #195

DarkWanderer opened this issue Feb 12, 2022 · 3 comments

Comments

@DarkWanderer
Copy link
Contributor

DarkWanderer commented Feb 12, 2022

Is your feature request related to a problem? Please describe.
I would like to run tests in a project which has CBA-like structure - multiple subdirectories and cross-addin function calls. To do that, I need to be able to load functions from multiple projects simultaneously - using CfgFunctions which is already defined in each project

See also: #186 #196

Describe the solution you'd like
Have a flag which allows sqfvm to parse CfgFunctions config section and load referenced SQF files from virtual filesystem, using PBO or explicit mapping via cmd arg
e.g. sqfvm --input-pbo my.pbo --parse-cfgfunctions

Describe alternatives you've considered
I have considered loading files manually - however, it is tedious and may lead to inconsistencies

@X39
Copy link
Collaborator

X39 commented Aug 4, 2023

Implemented in 73d30d4

To load CfgFunctions functions in SQF-VM, add --use-cfg-functions to the command line

Please reopen if not as desired in latest development release

@X39 X39 closed this as completed Aug 4, 2023
@DarkWanderer
Copy link
Contributor Author

Version built from development branch does not seem to read CfgFunctions correctly

sqfvm.exe --use-cfg-functions --suppress-welcome --input-pbo dynops_civilians.pbo
1:      [] call dynops_civilians_fnc_onCivilianKilled
2:

Executing...
------------------------------------------------------------------------------------------------------------------------------------------
[WRN] [L1|C8|__commandlinefeed.sqf]     A variable with the name 'dynops_civilians_fnc_onCivilianKilled' could not be found.
[WRN] [L1|C3|__commandlinefeed.sqf]     Nil value provided for right-handed argument.
[WRN] [L1|C35|__service]        No config entry with the name 'CfgFunctions' could be located at path config/bin.
[ERR] [L5|C20|__service]        Provided value is null.

[FAT] [L5|C20|__service]        Stacktrace:<  1 of 1> [L5|C20|__service]        [missionNamespace] [SCOPENAME-EMPTY]

dynops_civilians.zip

@X39
Copy link
Collaborator

X39 commented Aug 7, 2023

Possibly related to pbo input

@X39 X39 reopened this Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants