Author Topic: Convert hours in points  (Read 633 times)

Linker_Split

  • Full Member
  • ***
  • Posts: 115
    • View Profile
Convert hours in points
« on: September 10, 2017, 03:52:18 PM »
Hi All,
anybody got a formula or can help me out to assign points based on hours of play?
Basically, it's 1 point every hour.
Obviously, I would like to round up the minutes (so 1h 23m will be 2 points for example)

Anybody got something like this?

Thank you

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Convert hours in points
« Reply #1 on: September 11, 2017, 12:50:44 PM »
Yes, using the playingTime variable.  It holds the number of seconds the player was in the tournament.  Round up using the ceil() (ceiling) function.

ceil(playingTime / 3600)