From 1847fc1107e56dfeb5516075e43d0fdf28447f9f Mon Sep 17 00:00:00 2001 From: Lanta Date: Thu, 31 Oct 2024 13:53:53 +0100 Subject: [PATCH] sum --- update/matchparser.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update/matchparser.ps1 b/update/matchparser.ps1 index a268374..c97cc47 100644 --- a/update/matchparser.ps1 +++ b/update/matchparser.ps1 @@ -175,7 +175,7 @@ foreach ($file in $matchfiles) { } else { write-output "Archiving $($file.name)" - Move-Item -Path $file.FullName -Destination "$scriptroot/../data/killstats/archive/" -Force + Move-Item -Path $file.FullName -Destination "$scriptroot/../data/killstats/archive/." -Force -Verbose } } @@ -211,7 +211,7 @@ function Get-MatchStatsPlayer { $winratio_old = (($oldstats.$friendlyname | Where-Object { $_.playername -eq $player }).winratio) $winratio = Get-winratio -player_wins $player_wins -player_matches $player_matches $change = get-change -OldWinRatio $winratio_old -NewWinRatio $winratio - $avarage_human_damage = [math]::Round(($killstats.stats | where-object { $_.playername -eq $player -and $_.$filterProperty -like $typemodevalue }).HumanDmg / $player_matches) + $avarage_human_damage = [math]::Round((($killstats.stats | where-object { $_.playername -eq $player -and $_.$filterProperty -like $typemodevalue } | Measure-Object -Property HumanDmg -Sum).Sum / $player_matches), 2) write-host $filterProperty write-host $typemodevalue -- 2.49.1