Quote:
Originally Posted by Sylwester
You made a little mistake and also to make it work with integers the formula should look like this:
100 * Earned Achievements / Total Achievements
|
That won't work. It will perform integer division which will always be 0 in this case (when earned is less than total). You need to float them first and output a floating point value.
PHP Code:
new Float:percent = 100.0 * float(earned)/float(total)
@Yami, you have total and earned backwards.
__________________