From a520daeb5623c8ccef1532a66aae1d43153b4409 Mon Sep 17 00:00:00 2001 From: leka1986 <83298840+leka1986@users.noreply.github.com> Date: Tue, 18 Feb 2025 21:23:58 +0100 Subject: [PATCH] Update Range.lua attempt to index local 'target' (a nil value) Was using this build in another mission. Added a nilcheck. env.info('*** MOOSE GITHUB Commit Hash ID: 2025-02-14T06:13:08+01:00-24b320077721d45774acd56b25086ef6bdfb2e5a ***') --- Moose Development/Moose/Functional/Range.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moose Development/Moose/Functional/Range.lua b/Moose Development/Moose/Functional/Range.lua index 4d07eeffa..62b85e828 100644 --- a/Moose Development/Moose/Functional/Range.lua +++ b/Moose Development/Moose/Functional/Range.lua @@ -1933,7 +1933,7 @@ function RANGE:OnEventHit( EventData ) local _currentTarget = self.strafeStatus[_unitID] --#RANGE.StrafeStatus -- Player has rolled in on a strafing target. - if _currentTarget and target:IsAlive() then + if _currentTarget and target and target:IsAlive() then local playerPos = _unit:GetCoordinate() local targetPos = target:GetCoordinate()