This commit is contained in:
Lanta 2023-10-03 14:57:31 +02:00
parent c329e685cc
commit b55af2345e

View file

@ -19,13 +19,13 @@ function get-change {
if ($winratio -eq 0) { if ($winratio -eq 0) {
$change = 0 $change = 0
} else { } else {
# Decide how you want to handle this scenario o
$change = 0 $change = 0
} }
} else { } else {
$change = [math]::Round(($winratio - $winratio_old) , 2) $change = [math]::Round(($winratio - $winratio_old) , 2)
} }
return $change return $change
} }
function get-killstats { function get-killstats {
@ -121,7 +121,10 @@ foreach ($player in $all_player_matches.playername) {
$winratio = ($player_wins / $player_matches) * 100 $winratio = ($player_wins / $player_matches) * 100
$winratio_old = (($oldstats.all | Where-Object { $_.playername -eq $player }).winratio) $winratio_old = (($oldstats.all | Where-Object { $_.playername -eq $player }).winratio)
write-output "Calculating for player $player"
write-output "new winratio $winratio"
write-output "Old winratio $winratio_old"
$playerstats_all += [PSCustomObject]@{ $playerstats_all += [PSCustomObject]@{
playername = $player playername = $player