Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Another easy one... Timer problem?
#2
The issue is that `score` isn't cumulative, instead it's set equal to `Pick * 10 - TimePenalty` on each loop. `TimePenalty` is only the penalty for the current loop, it doesn't include any penalties for previous loops - even though there was a 1 point penalty on the previous loop to get 39 that penalty is lost when you do the next loop and `TimePenalty` is set to 0 (because you're within the 5 second window).

A simple solution is to do `TimePenalty = TimePenalty + Int((T2 - T1) / 5)`, that way `TimePenalty` will include any penalties from previous loops.

Alternatively you could stop using `Pick` and do `Score = Score + 10 - TimePenalty`, so that way score retains the penalties.

Of course, don't do both of the options or you'll double-count the penalties Big Grin
Reply


Messages In This Thread
RE: Another easy one... Timer problem? - by DSMan195276 - 03-19-2025, 06:05 AM
RE: Another easy one... Timer problem? - by bplus - 03-19-2025, 10:53 AM
RE: Another easy one... Timer problem? - by bplus - 03-19-2025, 11:24 PM
RE: Another easy one... Timer problem? - by Pete - 03-20-2025, 01:16 AM
RE: Another easy one... Timer problem? - by Pete - 03-21-2025, 06:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  I'm looking for suggestions to solve the problem! Petr 10 652 02-05-2026, 04:56 PM
Last Post: ahenry3068
  Nth problem with hardware images Ikerkaz 9 481 01-23-2026, 02:58 PM
Last Post: bplus
  Install problem...... jssantoro 6 383 12-17-2025, 08:31 PM
Last Post: madscijr
  maths problem with percentage pmackay 3 531 09-04-2025, 09:57 AM
Last Post: pmackay
  Problem with font in Teletext browser. SquirrelMonkey 7 749 08-27-2025, 11:38 AM
Last Post: BDS107

Forum Jump:


Users browsing this thread: 3 Guest(s)