From 7ec43c991343783fb3532bb1d42ad51884d44124 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Sat, 7 Feb 2026 16:57:48 +0100 Subject: [PATCH] #CONTROLLABLE - Make waypoint function a bit more robust --- Moose Development/Moose/Wrapper/Controllable.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Wrapper/Controllable.lua b/Moose Development/Moose/Wrapper/Controllable.lua index dc8582ec6..379412b8c 100644 --- a/Moose Development/Moose/Wrapper/Controllable.lua +++ b/Moose Development/Moose/Wrapper/Controllable.lua @@ -2184,7 +2184,8 @@ function CONTROLLABLE:TaskFunction( FunctionString, ... ) local ArgumentKey = '_' .. tostring( arg ):match( "table: (.*)" ) self:SetState( self, ArgumentKey, arg ) DCSScript[#DCSScript + 1] = "local Arguments = MissionControllable:GetState( MissionControllable, '" .. ArgumentKey .. "' ) " - DCSScript[#DCSScript + 1] = FunctionString .. "( MissionControllable, unpack( Arguments ) )" + --DCSScript[#DCSScript + 1] = FunctionString .. "( MissionControllable, unpack( Arguments ) )" + DCSScript[#DCSScript + 1] = FunctionString .. "( MissionControllable, ((type(Arguments)=='table') and unpack(Arguments) or nil))" else DCSScript[#DCSScript + 1] = FunctionString .. "( MissionControllable )" end