[Fixed] Canary's Cage: LUA_ScenEdit_AssignUnitToMission throws exception (Full Version)

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



Message


jonpspri -> [Fixed] Canary's Cage: LUA_ScenEdit_AssignUnitToMission throws exception (3/23/2021 5:26:41 PM)

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.




KnightHawk75 -> RE: Canary's Cage: LUA_ScenEdit_AssignUnitToMission throws exception (3/23/2021 9:11:57 PM)

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.






jonpspri -> RE: Canary's Cage: LUA_ScenEdit_AssignUnitToMission throws exception (3/23/2021 9:37:39 PM)

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.




jonpspri -> RE: Canary's Cage: LUA_ScenEdit_AssignUnitToMission throws exception (3/23/2021 9:49:30 PM)

See above ^^^ (Can't delete a post... only edit it)




Randomizer -> RE: Canary's Cage: LUA_ScenEdit_AssignUnitToMission throws exception (3/23/2021 11:07:40 PM)

@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




KnightHawk75 -> RE: Canary's Cage: LUA_ScenEdit_AssignUnitToMission throws exception (3/24/2021 1:09:43 AM)


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



[image]local://upfiles/61096/F399E28503FE4D9CAF3F28D02C1734FB.gif[/image]




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.7960205