dcs-liberation / dcs_liberation

DCS World dynamic campaign.
GNU Lesser General Public License v3.0
712 stars 185 forks source link

"RuntimeError: Duplicate convoy unit: Convoy 001 Unit #1" #1247

Closed NeelKulkarni6 closed 3 years ago

NeelKulkarni6 commented 3 years ago

Describe the bug Whenever I click 'take off' in this save game I get this error

RuntimeError: Duplicate convoy unit: Convoy 001 Unit #1

I haven't done any modifications to liberation or my game. I think the error has to do with a unit transfer.

To Reproduce I couldn't find a way to reproduce this bug, even when starting a new campaign and doing unit transfers. A discord mod told me to upload my save file:

https://www.filemail.com/d/duursgepgprznae

Expected behavior

For the Take Off button to work and create a nextturn mission and new window for that,

Version information (please complete the following information):

DanAlbert commented 3 years ago

Looks like this happens if you save the game on a turn that has generated some convoys, close the game, then reopen and create a new convoy. The number used to name the convoys isn't a part of the save file. It's actually a problem with all of our name generation, but most of that only happens when you generate a mission so there's no way for the duplicates to appear since it resets whenever you generate a mission.

Will think about the best way to fix this.

DanAlbert commented 3 years ago

I don't really like the fix... but it's fixed.