Starting handicap of 0 not recognised by formulas
-
We run a snooker competition where players are allocated a frame starting handicap for the season, which goes up by two points for each frame lost and down by two points for each win. The formula I’ve defined in SportsPress is:
starthcp – (2 * (frameswon – frameslost))
This works fine for all players except those whose starting handicap for the season is zero, where the formula doesn’t correctly calculate what their present handicap should be based on their wins and losses (it always outputs zero). I have found that if I enter their starting handicap as “0” rather than 0, then the formula calculates the current handicap correctly. For all players with a non-zero starting handicap, I can just enter the numeric value without quotes and the calculation works correctly, but the zero requires quotes around it. Why does this happen?
Running SportsPress 2.7.24 on WordPress 6.7.2.
- You must be logged in to reply to this topic.