Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle edge case with negative shots missed #65

Merged
merged 1 commit into from
Nov 29, 2021

Conversation

iBotPeaches
Copy link
Owner

Somehow SNlPEDRONE has 4 shots hit, 3 shots made in a game. This results in the API returning -1 as the missed property, which failed db constraints.

[2021-11-29 01:33:25] production.ERROR: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'shots_missed' at row 1 (SQL: insert into `game_players` (`player_id`, `game_id`, `rank`, `outcome`, `kd`, `kda`, `score`, `kills`, `deaths`, `assists`, `betrayals`, `suicides`, `vehicle_destroys`, `vehicle_hijacks`, `medal_count`, `damage_taken`, `damage_dealt`, `shots_fired`, `shots_landed`, `shots_missed`, `accuracy`, `rounds_won`, `rounds_lost`, `rounds_tied`, `kills_melee`, `kills_grenade`, `kills_headshot`, `kills_power`, `assists_emp`, `assists_driver`, `assists_callout`) values (44, 5564, 6, 2, 0.16666666666667, -10, 200, 2, 12, 0, 0, 0, 0, 0, 1, 2840, 444, 3, 4, -1, 133.33, 0, 2, 0, 0, 0, 1, 1, 0, 0, 0))  

Unsure if this is a bug in 343 or HaloDotAPI.

@iBotPeaches iBotPeaches added the bug Something isn't working label Nov 29, 2021
@iBotPeaches iBotPeaches merged commit 33c94ee into master Nov 29, 2021
@iBotPeaches iBotPeaches deleted the fix-snipedrone branch November 29, 2021 01:40
@iBotPeaches iBotPeaches mentioned this pull request Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant