From 8523b7e20a399aa296121f0a86886469c1a1c509 Mon Sep 17 00:00:00 2001 From: Shafik Date: Sun, 5 Jan 2025 10:47:14 +0200 Subject: [PATCH] [FIXED] `attempt to call method 'GetPlayerName' (a nil value)` --- Moose Development/Moose/Functional/CleanUp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moose Development/Moose/Functional/CleanUp.lua b/Moose Development/Moose/Functional/CleanUp.lua index 6bf5228f0..14616331f 100644 --- a/Moose Development/Moose/Functional/CleanUp.lua +++ b/Moose Development/Moose/Functional/CleanUp.lua @@ -411,7 +411,7 @@ function CLEANUP_AIRBASE.__:CleanUpSchedule() end end -- Clean Units which are waiting for a very long time in the CleanUpZone. - if CleanUpUnit and not CleanUpUnit:GetPlayerName() then + if CleanUpUnit and (CleanUpUnit.GetPlayerName == nil or not CleanUpUnit:GetPlayerName()) then local CleanUpUnitVelocity = CleanUpUnit:GetVelocityKMH() if CleanUpUnitVelocity < 1 then if CleanUpListData.CleanUpMoved then