What's missing in this Lua Condition? (Full Version)

All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series



Message


ProdigyofMilitaryPride -> What's missing in this Lua Condition? (8/2/2019 4:55:34 AM)

Trying to make certain facilities appear in a scenario that I'm creating through Lua-based conditions... But the conditions keep failing! Something's missing from them, but I don't know what it is.

Here's two examples...
ScenEdit_AddUnit({type = 'Facility', name = 'ERC-90 Section', dbid = 2983, 'DEG', Latitude='N16.52.12', Longitude='99.52.07', autodetectable='true', holdfire='true', proficiency=4})
ScenEdit_AddUnit({type = 'Facility', name = 'Mexican Command Post', 'DEG', dbid = 452, Latitude="N16.52.06", Longitude="99.53.33", autodetectable="true", holdfire="true", proficiency=4})




MagpieS -> RE: What's missing in this Lua Condition? (8/2/2019 8:12:19 AM)

You need E or W on the Longitude and they should be in ' not "

I don't think you need the 'DEG' either

I think that might be what's messing it up




Whicker -> RE: What's missing in this Lua Condition? (8/2/2019 3:19:52 PM)

I ran:
ScenEdit_AddUnit({type = 'Facility', name = 'Mexican Command Post', 'DEG', dbid = 452, Latitude="N16.52.06", Longitude="99.53.33", autodetectable="true", holdfire="true", proficiency=4})

and the error was that it was missing the side. I added that and it added the unit - though it ended up in Thailand, not sure if that was the right location or not, seems like an odd place for a mexican command post. maybe this is cause of that Magpies said. I usually get the lat lon off the map by pressing cntrl + x and then clicking somewhere, that copies it to the clipboard.

you can use either quotes as long as the pairs match - so '1234' is ok and so is "1234" but '1234" is not ok.




MagpieS -> RE: What's missing in this Lua Condition? (8/2/2019 9:49:53 PM)

Longitude 99 E is correct for Thailand.
Mexico would be W or negative




michaelm75au -> RE: What's missing in this Lua Condition? (8/3/2019 2:37:46 AM)

Yes, if adding a unit, it would be useful for the method to know on which side to add it.[:D]




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.75