I am trying to get a snippet that calculates a value and compare the result to a number - the value is correctly outputted from my snippet when I include the var by itself. However when I use the snippet in a comparison if statement it doesn't work. Here is my code:
{if total-positive-votes > 5} true {/if}
My snippet:
{exp:math_plus calculate="{var2}-({var1} - {var2})" var1="{overall_count}" var2="{overall_sum}"}
{math_plus_result}
{/exp:math_plus}
Which outputs the following numbers correctly (each comma is a would be comparison):
0, 1, 1, 4, 0, 0, 41, 8
So my comparison statement should output true on 41 and 8 but nothing comes back. Any one know why this isn't working? The funny thing is it used to work but I didn't use or upgrade this site for 2 years and it broke without me changing anything. Go figure!