From dae57abeffd8b63ba738455ffcc3b44de49dbadd Mon Sep 17 00:00:00 2001 From: Raffson Date: Sun, 22 Sep 2024 22:38:14 +0200 Subject: [PATCH] Fix 'getName' error in base script Turns out weapons also generate a dead event, but presumably some of them don't have a 'getName' method... --- resources/plugins/base/dcs_retribution.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/plugins/base/dcs_retribution.lua b/resources/plugins/base/dcs_retribution.lua index a6ff4fbd..5e4e190c 100644 --- a/resources/plugins/base/dcs_retribution.lua +++ b/resources/plugins/base/dcs_retribution.lua @@ -161,7 +161,7 @@ local function onEvent(event) write_state() end - if event.id == world.event.S_EVENT_DEAD and event.initiator then + if event.id == world.event.S_EVENT_DEAD and event.initiator and event.initiator.getName then dead_events[#dead_events + 1] = event.initiator.getName(event.initiator) local position = event.initiator.getPosition(event.initiator) local destruction = {}