Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

What's missing in this Lua Condition?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> What's missing in this Lua Condition? Page: [1]
Login
Message << Older Topic   Newer Topic >>
What's missing in this Lua Condition? - 8/2/2019 4:55:34 AM   
ProdigyofMilitaryPride

 

Posts: 103
Joined: 4/17/2015
Status: offline
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})

_____________________________

"The courageous must protect freedom." - Dwight D. Eisenhower
"Anything built by human hands can be destroyed. This is no exception." - Kei "Edge" Nagase, Ace Combat 5: The Unsung War
Post #: 1
RE: What's missing in this Lua Condition? - 8/2/2019 8:12:19 AM   
MagpieS

 

Posts: 22
Joined: 10/19/2008
Status: offline
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

< Message edited by MagpieS -- 8/2/2019 8:14:29 AM >

(in reply to ProdigyofMilitaryPride)
Post #: 2
RE: What's missing in this Lua Condition? - 8/2/2019 3:19:52 PM   
Whicker

 

Posts: 664
Joined: 6/20/2018
Status: offline
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.

(in reply to MagpieS)
Post #: 3
RE: What's missing in this Lua Condition? - 8/2/2019 9:49:53 PM   
MagpieS

 

Posts: 22
Joined: 10/19/2008
Status: offline
Longitude 99 E is correct for Thailand.
Mexico would be W or negative

(in reply to Whicker)
Post #: 4
RE: What's missing in this Lua Condition? - 8/3/2019 2:37:46 AM   
michaelm75au


Posts: 13500
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
Yes, if adding a unit, it would be useful for the method to know on which side to add it.

_____________________________

Michael

(in reply to MagpieS)
Post #: 5
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> What's missing in this Lua Condition? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.844