From b983e9f8b4dd89c471a9af5d084d30360e1d49a3 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Fri, 14 Nov 2025 17:27:26 +0100 Subject: [PATCH] SXX --- Moose Development/Moose/Functional/Scoring.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Functional/Scoring.lua b/Moose Development/Moose/Functional/Scoring.lua index d9427d279..042217508 100644 --- a/Moose Development/Moose/Functional/Scoring.lua +++ b/Moose Development/Moose/Functional/Scoring.lua @@ -325,6 +325,8 @@ function SCORING:New( GameName, SavePath, AutoSave ) self:OpenCSV( GameName ) end + self:I("SCORING "..tostring(GameName).." started! v"..self.version) + return self end @@ -399,6 +401,11 @@ end -- @return #SCORING function SCORING:AddStaticScore( ScoreStatic, Score ) + if ScoreStatic == nil then + BASE:E("SCORING.AddStaticScore: Parameter ScoreStatic is nil!") + return self + end + local StaticName = ScoreStatic:GetName() self.ScoringObjects[StaticName] = Score @@ -1305,7 +1312,7 @@ function SCORING:_EventOnDeadOrCrash( Event ) local Destroyed = false -- What is the player destroying? - if Player and Player.Hit and Player.Hit[TargetCategory] and Player.Hit[TargetCategory][TargetUnitName] and Player.Hit[TargetCategory][TargetUnitName].TimeStamp ~= 0 and (TargetUnit.BirthTime == nil or Player.Hit[TargetCategory][TargetUnitName].TimeStamp > TargetUnit.BirthTime) then -- Was there a hit for this unit for this player before registered??? + if Player and Player.Hit and Player.Hit[TargetCategory] and Player.Hit[TargetCategory][TargetUnitName] and Player.Hit[TargetCategory][TargetUnitName].TimeStamp ~= 0 and TargetUnit and (TargetUnit.BirthTime == nil or Player.Hit[TargetCategory][TargetUnitName].TimeStamp > TargetUnit.BirthTime) then -- Was there a hit for this unit for this player before registered??? local TargetThreatLevel = Player.Hit[TargetCategory][TargetUnitName].ThreatLevel local TargetThreatType = Player.Hit[TargetCategory][TargetUnitName].ThreatType