From 2fc7a3b542b04ec115510f27463488ad554ce16d Mon Sep 17 00:00:00 2001 From: leka1986 <83298840+leka1986@users.noreply.github.com> Date: Sun, 23 Feb 2025 02:34:04 +0100 Subject: [PATCH] Update Controllable.lua Fixing this error Line 26056: attempt to index local '_coord' (a nil value) in this line, local _tocoord=_coord:GetRandomCoordinateInRadius(_radius,100) --- Moose Development/Moose/Wrapper/Controllable.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Moose Development/Moose/Wrapper/Controllable.lua b/Moose Development/Moose/Wrapper/Controllable.lua index 362f6eb03..5dbd66ffd 100644 --- a/Moose Development/Moose/Wrapper/Controllable.lua +++ b/Moose Development/Moose/Wrapper/Controllable.lua @@ -4263,6 +4263,9 @@ function CONTROLLABLE:RelocateGroundRandomInRadius( speed, radius, onroad, short self:F2( { self.ControllableName } ) local _coord = self:GetCoordinate() + if not _coord then + return self + end local _radius = radius or 500 local _speed = speed or 20 local _tocoord = _coord:GetRandomCoordinateInRadius( _radius, 100 )