LuziferSenpai / Automatic-Coupling-System

2 stars 1 forks source link

Temporary Train Stop causes nil index error #2

Closed robot256 closed 5 years ago

robot256 commented 5 years ago

When arriving at a Temporary Stop in Factorio 0.17 (ctrl-click on map to add to schedule), the train state is "wait_at_station" but the station value is nil. This causes a nil index error when control.lua tries to retrieve the signal wire contents. Stack trace:

Error while running event Automatic_Coupling_System::on_train_changed_state (ID 23)
__Automatic_Coupling_System__/control.lua:9: attempt to index local 's' (a nil value)
stack traceback:
    __Automatic_Coupling_System__/control.lua:9: in function 'CS'
    __Automatic_Coupling_System__/control.lua:144: in function 'CC'
    __Automatic_Coupling_System__/control.lua:200: in function <__Automatic_Coupling_System__/control.lua:195
LuziferSenpai commented 5 years ago

Fixed in Version 0.2.2

robot256 commented 5 years ago

Tested the fix, it works! Thanks!