raymix 1 Posted June 5, 2015 (edited) 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 June 6, 2015 by Raymix Share this post Link to post Share on other sites
austin_medic 109 Posted June 6, 2015 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
killzone_kid 1330 Posted June 6, 2015 recompile =1; Share this post Link to post Share on other sites
raymix 1 Posted June 7, 2015 (edited) 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 June 7, 2015 by Raymix Share this post Link to post Share on other sites
killzone_kid 1330 Posted June 7, 2015 I used recompile=1 in server addon without problem. Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted June 7, 2015 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
raymix 1 Posted June 7, 2015 (edited) 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 June 7, 2015 by Raymix Share this post Link to post Share on other sites
killzone_kid 1330 Posted June 7, 2015 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
raymix 1 Posted June 7, 2015 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