LuziferSenpai / Automatic-Coupling-System

2 stars 1 forks source link

Error migrating from 2.0.0 to 2.0.1 #7

Closed Penguin-Spy closed 4 months ago

Penguin-Spy commented 4 months ago

The mod causes an error while running the on_configuration_changed handler when updating from 2.0.0 to version 2.0.1, specifically at line 255 in control.lua: https://github.com/LuziferSenpai/Automatic-Coupling-System/blob/17565f233bb8c6c0f2d20075415e78596ad2232e/control.lua#L220-L225 I believe the issue is with the condition https://github.com/LuziferSenpai/Automatic-Coupling-System/blob/17565f233bb8c6c0f2d20075415e78596ad2232e/control.lua#L220-L220 as that will run the migration when upgrading from version 2.0.0 which apparently does not ever create the global.TrainsID table. I believe the correct condition would be oldAtcVersion < "2.0.0" (less than, not less than or equal to).

I am able to reproduce the error by creating a new save with just the 2.0.0 version of the mod, not placing anything (not even any trains), saving the world and then loading it with the 2.0.1 version of the mod. The issue does not occur when upgrading from 1.0.1 to 2.0.1.

LuziferSenpai commented 4 months ago

Thanks, fixed with 2.0.2