Hi!
Would you mind sending us an example so we can see what is being shown there?
Kind Regards,
-Roch
Thread Starter
twizz
(@twizz)
Hey Roch,
Please take a look at this link.
Thanks,
Twizz
Thanks, twizz
If the math in your hits average is being calculated make sure you have the *100 multiplier. I believe the issue there is that all averages are being rounded to zero (for example 0.5 = 0)
Kind Regards,
-Roch
Thread Starter
twizz
(@twizz)
The batting average is built into the theme and the average should include 3 decimal places. If I multiply by 100, that will change a .300 average to 30. I’ve been trying to search through the code to find the equation, but have come up empty handed. Do you know what file it’s in?
-Twizz
Thread Starter
twizz
(@twizz)
Hey Roch,
I found the problem.
The variable ‘avg’ was configured in both the Player Performance AND Player Statistic sections. Since the actual equation used to compute ‘avg’ is in the Statistic section, I removed the variable from the Performance section. I immediately checked the player’s page and everything appears to be functioning as expected, now.
I realized where the conflict was after looking at /wp-content/plugins/sportspress/presets/team-sports/softball.json and noticing AVG didn’t exist in the “performance” array. Although I can’t remember doing so, I must have created the Player Performance ‘avg’ variable at some point.
Thanks for trying to help me solve this!
-Twizz
Hi Twizz!
Thanks a lot for sharing how you’ve solved this! We’ll look into this to avoid future issues.
Kind Regards,
-Roch
Hi! I have the same problem, the field AVG (preset in the plugin) doesn’t fill automaticly with the value (which should be something like .nnn e.g. .350).
How can I fix the problem? Thanks,
Toti.