I've got this action:
It's supposed to assign a Global Value a specific number based on the equation below:
Round(( ( -2 / 3 ) * Music Zone pow 4 ) + ( ( 11 / 2 ) * Music Zone pow 3 ) - ( ( 95 / 6 ) * Music Zone pow 2 ) + ( ( 18 ) * Music Zone ) + 1)
I selected this equation in order to output a specific value for inputs from 0-4:
However when I run my program for an input of 3, it outputs the value 55, when it's supposed to output 7.
I've tried several things to fix it, but none have worked so far.
Is there an issue with the parsing in this formula? Is the formatted wrong? I tried changing the format in different ways, but they never resulted in 55 specifically.
The Music Zone variable stays at 3 throughout the duration that this formula was used. I genuinely don't know what could be going wrong.
My project is probably too in-depth to go over every detail that might affect this, so I'm asking if this formula is done correctly, because if it is, then I can focus on other parts of my code to find the problem.
[EDIT: I've managed to "fix" it by converting the fractions to decimals. Clickteam must have some issues with fractions in expressions like this.]
[EDIT: Found out that fractions need a .0 decimal after the integer numerator or denominator in order to function completely.]