jleonard2099 / LHG_CollegeBB

Lance Haffner Courtside College Basketball
GNU Affero General Public License v3.0
5 stars 0 forks source link

Game stat totals wrong #22

Closed jleonard2099 closed 1 year ago

jleonard2099 commented 1 year ago

The totals for several categories in the stats display during game (STATS2SCREEN) are not accurate. The individual values seem fine but the logic for creating totals (or initialization of variables) is flawed.

I have done limited testing on this but it only appears to happen for the first team in the game / stats screen.

In summary, we need to investigate the calculations of TOTALS for the following:

The current screenshot I have is from when there was briefly a bug (already fixed) that caused Fouls to be abnormally high, but as you can see the total values (ie, 203) do not match the sum of the individual values above. I will add more screenshots as I have time.

Screenshot 2023-08-15 131001

jleonard2099 commented 1 year ago

This screenshot is from more recent code. Notice high # of Fouls / FTAs. This trend did not exist for second team.

Screenshot 2023-08-17 171835

jleonard2099 commented 1 year ago

After further review, there was one or more areas where the variable used to perform the totals were not being 0'd out. It is possible they were deleted by accident at some point.

This is important because the QUARTERTOTAL routine gets called during the game and calculates using the same variables. So esssentially these totals were getting duplicated in some instances.

Now that the array is 0'd out each time before being used to calculate sums, the sums are printing accurately.

This wil be reflected in the next commit and public release