You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[x] Bug report
[ ] Feature request or improvement for an existing cog
Name of the cog in question:
rainbow6siege
Description of my issue/request:
Usage of "stats" command for newer players causes a divide by 0 error because the Ubisoft API stopped tracking shots fired (but not shots landed) at some point. Consequently, the bot tries to p.bullets_hit / p.bullets_fired when bullets_fired is 0.
If it's a bug, steps to reproduce:
Use stats command with a newish (last 2~4 months?) player as the input (only tested on Uplay platform)
If it's a bug, a stack trace:
[I already dirty-fixed this locally with the below code, so I no longer have a stack trace available, but it clearly indicated there was a divide by 0 error]
Known fix:
Add a check of "if 0, substitute with 1" to the shots fired count in the "Shots" field, e.g.
I am submitting a...
Name of the cog in question:
rainbow6siege
Description of my issue/request:
Usage of "stats" command for newer players causes a divide by 0 error because the Ubisoft API stopped tracking shots fired (but not shots landed) at some point. Consequently, the bot tries to
p.bullets_hit / p.bullets_fired
when bullets_fired is 0.If it's a bug, steps to reproduce:
If it's a bug, a stack trace:
[I already dirty-fixed this locally with the below code, so I no longer have a stack trace available, but it clearly indicated there was a divide by 0 error]
Known fix:
Add a check of "if 0, substitute with 1" to the shots fired count in the "Shots" field, e.g.
(I'd put in a pr but I've honestly forgotten how to do that since the last time I had to use git)
The text was updated successfully, but these errors were encountered: