armake2 icon indicating copy to clipboard operation
armake2 copied to clipboard

Support `__EVAL`

Open bovine3dom opened this issue 6 years ago • 1 comments
trafficstars

commy2 claims that you don't want to reimplement SQF and so don't support __EVAL, which sounds reasonable.

Could you throw an error if armake2 encounters such an expression? It currently just suggests quoting it, which is misleading.

~~Would you be willing to offer an __ARMAKEVAL that used e.g https://github.com/rekka/meval-rs? In our projects we mostly just use it for little bits of maths.~~ baermitumlaut pointed out that one can just remove the __EVAL and ArmA will magically do the maths anyway for my use-case.

bovine3dom avatar Mar 02 '19 18:03 bovine3dom

This can be resolved by letting Arma evaluate __EVAL expressions on load, that is accomplished by storing the string and marking it as "expression" (value sub-type 4) in binarized config (add here) and in turn editing the parser to read __EVAL correctly and pass required data along.

Simple things should still be evaluated during binarization if possible, to speed up load times (simple math expressions and other things not using SQF).

Source: @dedmen

jonpas avatar Jun 20 '19 14:06 jonpas