HpBar error?
Posted: Tue Jul 30, 2013 6:15 pm
I have a hp bar and other similar bars. The code to show hp as a percentage of 100% used to work but suddenly stopped working, despite not touching the code.
Does this look alright?
If I manually set hpValue to a number it will display, so the problem is with the calculation I suspect.
Does this look alright?
- Code: Select all
int hpValue = ((float)CharDataArray[party[partyPos]].hp/CharDataArray[party[partyPos]].maxHp)*100;
If I manually set hpValue to a number it will display, so the problem is with the calculation I suspect.