MikeSinn Posted February 20, 2016 Posted February 20, 2016 I am a complete newbie to Lua programming and only slightly less so to the DCS Mission Editor. I am trying to create a simple bomb range script that selects a random target, clones it and places it in a bomb range zone. The code I have so far is: -- Clone Random target & zone local tgt = 'tgt_bmb_easy' local tgt_zone = 'bmb_zone' local tgtChoice = mist.random(2) local zoneChoice = mist.random(6) tgt = tgt..tgtChoice tgt_zone = tgt_zone..zoneChoice trigger.action.outText(tgt,10) trigger.action.outText(tgt_zone,10) mist.cloneInZone(tgt,tgt_zone) this is triggered via a F10 radio message but when executed I get the attached error. I have also attached a copy of the .miz file. I can see the tgt and tgt_zone variables are being formatted correctly via the outText command. My guess is that I'm not passing them correctly to the cloneInZone function. I just can't figure out the missing element. Any and all guidance is appreciated.Training Range04.miz
MikeSinn Posted February 20, 2016 Author Posted February 20, 2016 For those that may ever have a similar issue, I found the problem. My simple CloneInZone script actually worked as designed. There error message looks to have been due to using an older version of mist (3.3). I didn't realize there was a newer version until today. After loading 4.1 into my mission, the script worked fine. One more stumble step towards figuring LUA and the editor out.
Recommended Posts