• Hello,

    I was just wondering if there was a way to make BadgeOS accept points with decimals (i.e. 1.25 points, 1.5 points)? I tried setting 1.5 points for an achievement and it seems to always round down to 1 point. Is there a way to get around this?

    Any help you can provide is greatly appreciated.

    Thanks very much,

    James

    https://ww.wp.xz.cn/plugins/badgeos/

Viewing 1 replies (of 1 total)
  • Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not really. We make good use of the absint() function https://codex.ww.wp.xz.cn/Function_Reference/absint and that rounds off the numbers.

    Just an idea off the top of my head, say you want to give the impression of 1.5 points for an achievement. For the actual points given, you could award 150 and before you do any display to the user, do the math to get it to show as 1.5. You could even go so far as to store that in your own custom user meta key, for some simplicity.

    Just a thought/workaround.

Viewing 1 replies (of 1 total)

The topic ‘Points with Decimal Values?’ is closed to new replies.