Fixed key problem in TaskFunction()

This commit is contained in:
FlightControl_Master 2017-08-08 18:08:40 +02:00
parent 8a334b6671
commit 3dde62a550

View File

@ -1592,7 +1592,7 @@ function CONTROLLABLE:TaskFunction( FunctionString, ... )
DCSScript[#DCSScript+1] = "local MissionControllable = GROUP:Find( ... ) "
if arg and arg.n > 0 then
local ArgumentKey = tostring( arg )
local ArgumentKey = tostring( arg ):match("table: (.*)")
self:SetState( self, ArgumentKey, arg )
DCSScript[#DCSScript+1] = "local Arguments = MissionControllable:GetState( MissionControllable, '" .. ArgumentKey .. "' ) "
DCSScript[#DCSScript+1] = "MissionControllable:ClearState( MissionControllable, '" .. ArgumentKey .. "' ) "