How to get the percentage of two counters without decimal ?
I need to find value „Counter” as a percentage of „ Counter 2” value. I’ve got three counters. Counter (my variable value) , Counter 2 ( This is my 100% value – it’s stable) , Counter 3 ( result in percentage ).
I used -> Set Counter to :
( value( "Counter" ) + 0.0 ) / ( value( "Counter 2" ) + 0.0 ) * 100
It works. But result is value with decimals. Is it possible to set „Counter 3” without decimalas (only full figures) ?
Thank you - very helpful.
Hi - Thank you for posting. I was having a lot of difficulty showing a percentage with decimals in an Android game. I was didiving to counter values and could not get a proper calculation. It used to work flawlessly in Clickn' Create and in Multimedia Fusion 2.0. I think they changed something in the counter code and messed up the handling of decimals. Anyway, this solves my problem. Thank you again.