Download

Stumped on percentage formula.

Ok I am stumped as to why my progress bar or even my xp percent var isn’t even updating.

XpPercent = PlayerXP / PlayerXPTable[PlayerLevel - 1];

XpPercent is a float used to store percentage to next level which is viewable in the editor
PlayerXP is an int that stores the players current xp points
PlayerXPTable is an array used to store the values of required xp to gain a level

Please note player can level up however the progress bar will not fill up, and I don’t think it has anything to do with focus because the percentage variable stays at 0.

Cast your integers to floats before the divide