Rory Noonan
Posts: 2816
Joined: 12/18/2014 From: Brooklyn, NY Status: offline
|
quote:
Guys once again I stand before you, cap in hand, Im looking to tap into your LUA knowledge. I want add a aircraft inflight, so I used the search function and found the following post by gunner98 ScenEdit_AddUnit({type='Ship', side='NATO Support', name='AOE 6 Supply', dbid='490', heading='240', latitude='55.3474463444513', longitude='-35.1083051655598'}) Just change up everything inside the '..' to what you need. You can get the Lat/Long by clicking your mouse on the map where you want it - leave the pointer there and use the hotkey 'Ctrl x', it is now in your computers clipboard and you can paste it. So I tried that changing it too: ScenEdit_AddUnit({type='aircraft', side='A', name='OV-10A Bronco', dbid='3007', heading='240',latitude='19.1811289766319', longitude='104.916723814066'}) I tried that various things as below, I wondered where the aircrafts altitude is added in so I tried adding that in as well, but got the following results: >> ScenEdit_AddUnit({type='aircraft', side='A', name='OV-10A Bronco', dbid='3007', heading='240',latitude='19.1811289766319', longitude='104.916723814066'}) ERROR: Sequence contains no matching element >> ScenEdit_AddUnit({type='aircraft', side='A', name='OV-10A Bronco', dbid='3007', heading='240',latitude='19.1811289766319', longitude='104.916723814066' altitude='5000'}) ERROR: [string "Console"]:1: '}' expected near 'altitude' Missing a comma after the longitude value. quote:
>> ScenEdit_AddUnit({type='aircraft', side='A', name='OV-10A Bronco', dbid='3007', heading='240',latitude='19.1811289766319', longitude='104.916723814066','5000'}) ERROR: Sequence contains no matching element The altitude key needs to be specified: altitude=5000 quote:
>> ScenEdit_AddUnit({type='aircraft', side='A', name='OV-10A Bronco', dbid='3007', heading='240',latitude='19.1811289766319', longitude='104.916723814066}) ERROR: [string "Console"]:1: unfinished string near ''104.916723814066}) ' the value for longitude is missing a ' -- you can either add an extra ' or get rid of the one that's already there (numbers in this table don't need quote marks, just strings) quote:
>> ScenEdit_AddUnit({type='aircraft', side='A', name='OV-10A Bronco', dbid='3007', heading='240',latitude='19.1811289766319', longitude='104.916723814066.}) ERROR: [string "Console"]:1: unfinished string near ''104.916723814066.}) ' >> ScenEdit_AddUnit({type='aircraft', side='A', name='OV-10A Bronco', dbid='3007', heading='240',latitude='19.1811289766319', longitude='104.916723814066,}) ERROR: [string "Console"]:1: unfinished string near ''104.916723814066,}) ' Same issue. It gets easier with practice!
|