Jump to content
Sign in to follow this  
raymix

How to enable true dev version?

Recommended Posts

Guys, tiny issue here. I have functions defined under CfgFunctions and packed in a PBO, problem is they are instantly compileFinal'd and I'd like to be able to enable recompile and work with them using unpacked data method.

edit#3: Been at it all night. Something is compile finalizing all functions against my will. I've replaced init line inside cfgFunctions to a modified bis_fnc_initFunctions, yet it still finalizes everything. Any idea what's going on?

edit#4: definitely a bug or nasty "security feature". Will make my own version.

Edited by Raymix

Share this post


Link to post
Share on other sites
Guys, tiny issue here. I have functions defined under CfgFunctions and packed in a PBO, problem is they are instantly compileFinal'd and I'd like to be able to enable recompile and work with them using unpacked data method.

edit#3: Been at it all night. Something is compile finalizing all functions against my will. I've replaced init line inside cfgFunctions to a modified bis_fnc_initFunctions, yet it still finalizes everything. Any idea what's going on?

edit#4: definitely a bug or nasty "security feature". Will make my own version.

cfgFunctions always does compileFinal to my knowledge. There is no way to turn it off since it could get exploited by clowns who want to trash servers.

Share this post


Link to post
Share on other sites
cfgFunctions always does compileFinal to my knowledge. There is no way to turn it off since it could get exploited by clowns who want to trash servers.

yeah, figured as much. As long as its not a bug, I'm fine with it.

recompile =1;

nope, not when defined inside addon. It will, however try to recompile it as expected,but give error that trying to overwrite finalized function. I've also tried adding:

cheatsEnabled = 1;

But to no avail.

So I took the liberty to trace the whole chain down to first step, replace it and remove any traces of compileFinal (starts at a3\ui_f >> RscDisplayStart Line #61083):

onLoad = "[2] call compile preprocessfilelinenumbers gettext (configfile >> 'CfgFunctions' >> 'init');

and it was still finalizing everything against my will. Which only means that addons are finalized no matter what and cfgFunctions added inside missionConfig only works this way.

Solution is to build my own replica of cfgFunctions and initFunctions, make it lighter only to fit my needs while taking advantage of injected META headers (maybe even footers) and registering it with function viewer.

edit: while making my version, I can confirm that recompile = 1; has indeed no effect to what is compileFinal at current state. I see that cheatsEnabled =1; originally was intended for this ability, but it was never implemented.

Edited by Raymix

Share this post


Link to post
Share on other sites
I used recompile=1 in server addon without problem.

works for me too.

not sure why OP is going through all this trouble.

The general path most scripters/designers take is to only register your functions in the integrated Functions Library once they're working/done. All this trouble with injecting meta headers and whatnot seems like a lot of unnecessary fussing around.

Share this post


Link to post
Share on other sites

btw while on the recompile subject, here's a quote from code, line #441:

_errorText = "Redundant use of 'recompile = 1;' in %1 - mission / campaign functions are recompiled on start by default.";

Not interested in working with mission/campaign config files. As mentioned in first post first line, I'd like to see if I can work with unpacked data, hopefully in MP environment. if recompile exists in cfg, then save to missionNamespace only, else finalize it inside uiNamespace and create shortcut.

Edited by Raymix

Share this post


Link to post
Share on other sites

I see, so this is about recompile but not recompile but rather cheatsEnabled but not cheatsEnabled but rather diag_log. I'm glad you finally found the problem.

Share this post


Link to post
Share on other sites

Removed last part in previous post ... sometimes telling the background story only leads to more confusion.

Yes, the problem was misleading documentation and broken bis init function.

The very same reason we all get this error: http://feedback.arma3.com/view.php?id=19151

Any function defined in cfgFunctions inside addon configFile (with recompile =1; ) would show exact same error right after lines in that bug report. Every single time you restart mission in editor same errors are shown.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×