From 74520b13599571523b966a8c2070cfd0bd09a5d1 Mon Sep 17 00:00:00 2001 From: Shafik Date: Fri, 31 Jan 2025 10:30:18 +0200 Subject: [PATCH] [FIXED] attempt to index a nil value (`AWACS:_CheckAwacsStatus` -> `OPSGROUP:GetCallsignName` -> `GROUP:IsPlayer`) --- Moose Development/Moose/Wrapper/Group.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Wrapper/Group.lua b/Moose Development/Moose/Wrapper/Group.lua index aedf6412d..e72822977 100644 --- a/Moose Development/Moose/Wrapper/Group.lua +++ b/Moose Development/Moose/Wrapper/Group.lua @@ -757,7 +757,11 @@ end -- @param #GROUP self -- @return #boolean If true, group is associated with a client or player slot. function GROUP:IsPlayer() - return self:GetUnit(1):IsPlayer() + local unit = self:GetUnit(1) + if unit then + return unit:IsPlayer() + end + return false end --- Returns the UNIT wrapper object with number UnitNumber. If it doesn't exist, tries to return the next available unit.