Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

[Fixed] Canary's Cage: LUA_ScenEdit_AssignUnitToMission throws exception

 
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 >> Tech Support >> [Fixed] Canary's Cage: LUA_ScenEdit_AssignUnitToMission throws exception Page: [1]
Login
Message << Older Topic   Newer Topic >>
[Fixed] Canary's Cage: LUA_ScenEdit_AssignUnitToMission... - 3/23/2021 5:26:41 PM   
jonpspri


Posts: 21
Joined: 6/3/2014
Status: offline
Running build 1.02.114714 on Windows 10.

New Scenario load Canary's Cage and push start.

Multiple dialogs "Error in LUA_ScenEdit_AssignUnitToMission: Exception of type '_._' was thrown."

I don't have any scenario design experience, but it appears a bunch of mission initialization is done in Game_Setup event action to introduce random air traffic and shipping traffic. I'm not quite ready to dig into debugging that myself, but I'll happily take guidance if you cannot reproduce directly.

< Message edited by Rory Noonan -- 4/6/2021 8:09:18 PM >
Post #: 1
RE: Canary's Cage: LUA_ScenEdit_AssignUnitToMission thr... - 3/23/2021 9:11:57 PM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
Issue is it's using "Wander" as a mission name and said mission does not exist on the side the unit is a member of.
Line 61 ScenEdit_AssignUnitToMission(unit.name, 'Wander')
Either the mission need to be created first in the script (or put in the scene ahead of time), or this line removed.

Also Line 220 is missing Civilian side in quotes, this will also generate unnoticed errors, though it looks like it doesn't create any downstream issues.

Interim fix, either comment out lines 61 (or add the mission), and add quotes around "Civilian" in 220, run ScenEdit_ClearKeyValue('firstLoad'), save, reload\replay.
Attached a modded version (saved and tested under 1147.16) for those that don't know how to do that (added a generic SCP mission to cover the bounded zone the bio's get created in, seems to work as intended).

The only negative of playing unchanged besides all the pop-up error messages, is the bio contacts that get randomly generated don't move around from where they are generated, so the scenario is likely easier from an underwater contact perspective.




Attachment (1)

< Message edited by KnightHawk75 -- 3/23/2021 9:15:03 PM >

(in reply to jonpspri)
Post #: 2
RE: Canary's Cage: LUA_ScenEdit_AssignUnitToMission thr... - 3/23/2021 9:37:39 PM   
jonpspri


Posts: 21
Joined: 6/3/2014
Status: offline
Interesting. "Wander" is a mission defined for Neutral, not for Nature. I wonder how long that's been broken.

At any rate, thanks for the patch. I redid it for myself just to start getting the hang of things, though I think I missed the magic of ScenEdit_ClearKeyValue('firstLoad') in mine, so I'll likely delete the next post.

Thanks for looking at it. For some reason I come back to this scenario a lot.

< Message edited by jonpspri -- 3/23/2021 10:02:12 PM >


_____________________________

"You have debauched my sloth." - Stephen Maturin in H.M.S. Surprise

(in reply to KnightHawk75)
Post #: 3
RE: Canary's Cage: LUA_ScenEdit_AssignUnitToMission thr... - 3/23/2021 9:49:30 PM   
jonpspri


Posts: 21
Joined: 6/3/2014
Status: offline
See above ^^^ (Can't delete a post... only edit it)

< Message edited by jonpspri -- 3/23/2021 10:02:43 PM >


_____________________________

"You have debauched my sloth." - Stephen Maturin in H.M.S. Surprise

(in reply to jonpspri)
Post #: 4
RE: Canary's Cage: LUA_ScenEdit_AssignUnitToMission thr... - 3/23/2021 11:07:40 PM   
Randomizer


Posts: 1473
Joined: 6/28/2008
Status: offline
@KH75, thanks for the fix! I had caught the Wander mission error for side Nature but not the 'Civilian' error in Line 220. Probably never would have found that.

-C

(in reply to jonpspri)
Post #: 5
RE: Canary's Cage: LUA_ScenEdit_AssignUnitToMission thr... - 3/24/2021 1:09:43 AM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline

quote:

ORIGINAL: Randomizer

@KH75, thanks for the fix! I had caught the Wander mission error for side Nature but not the 'Civilian' error in Line 220. Probably never would have found that.

-C






Attachment (1)

(in reply to Randomizer)
Post #: 6
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Tech Support >> [Fixed] Canary's Cage: LUA_ScenEdit_AssignUnitToMission throws exception 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

5.422