I agree.This is weird...
Just tested the following code:
Code:
# Test formula alternatives [event] name=side 1 turn 1 {VARIABLE v1 1} {VARIABLE v2 2}{DEBUG_MSG (_"v1=$v1 and v2=$v2, about to compare formulas for v1+v2+2")} [set_variable] name=fa formula="$v1 + $v2 + 2" [/set_variable]{DEBUG_MSG (_"Formula ""v1+v2+2"" produced ""$fa""")} [set_variable] name=fb formula="$($v1 + $v2 + 2)" [/set_variable]{DEBUG_MSG (_"Formula with dollarsign and brackets produced ""$fb""")} [if] {VARIABLE_CONDITIONAL fa equals $fb} {VARIABLE_CONDITIONAL fa numerical_equals $fb} [then]{DEBUG_MSG (_"Match")} [/then] [else]{DEBUG_MSG (_"Ooops")} [/else] [/if] [/event]
The scenario code is inside a macro and executes several nested events deep.
It's also inside a foreach loop and $this_item is, I guess, a container variable?
I could try the old format again in the "live" code and see if I still get the same issue, but I can't do it right now as I'm busy making a mess of writing another scenario that uses the same logic and I'm not in a position to quickly playtest this right now. Will be much easier when this scenario is completed and thoroughly playtested (so hopefully before Christmas

Thanks for your post, much appreciated.
Cheers!
-- Spannerbag
Statistics: Posted by Spannerbag — Today, 10:20 am