I find that only the landing setting functions of AI_A2A_Dispatcher is not working
ERROR SCRIPTING (Main): Mission script error: [string "C:\Users\admin\AppData\Local\Temp\DCS\/~mis00006337.lua"]:141027: attempt to index local 'self' (a nil value)
I find that in the MOOSE.lua, all the AI_A2G_Dispatcher landing functions is commeted out, so as take off functions. Hoever, only landing method setting gives me the "a nil value error"
Here is my script.
All the group names are okay, if I remove the setsquardronlanding method then the script is okay
Detection_SetGroup_Red=SET_GROUP:New():FilterCoalitions("red"):FilterPrefixes({"Red_EWR","Red_AWACS"}):FilterStart()
Detection_from_Red=DETECTION_AREAS:New(Detection_SetGroup_Red,20000)
Red_A2A_Dispatcher=AI_A2A_DISPATCHER:New(Detection_from_Red)
--Red_A2A_Dispatcher.SetSquadronLandingAtEngineShutdown()
Red_A2A_Dispatcher:SetGciRadius(120000)
Red_A2A_Dispatcher:SetSquadron("Maykop_Khanskaya",AIRBASE.Caucasus.Maykop_Khanskaya,{"Red_GCI"},12)
Red_A2A_Dispatcher:SetSquadronGci( "Maykop_Khanskaya", 900, 1200 )
Red_A2A_Dispatcher:SetSquadronTakeoffFromParkingHot("Maykop_Khanskaya")
How to deal with it?