The problem is I'm struggling to do the calculation to work out how many 100, 10s and 1s are in the u16!

I thought the below code would work but it doesn't :/ can someone help me?

Code: Select all

```
mod = fix16ToRoundedInt(intToFix16(GameVariables.ConcertEnergy) % 100);
intTemp1 = fix16ToRoundedInt(intToFix16((GameVariables.ConcertEnergy) - FIX16(mod) / 100));
mod = fix16ToRoundedInt(intToFix16(GameVariables.ConcertEnergy % 10));
intTemp2 = fix16ToRoundedInt(intToFix16((GameVariables.ConcertEnergy - FIX16(mod)) / 10));
```