Some Train Stations Are Optional

by gust334

if a station cannot be reached, it will be skipped if it starts/ends with '?'

Tweaks
13 hours ago
2.0
33
Trains

b crash

14 hours ago
(updated 14 hours ago)

I am using this with train scaling mod and once it built the train I got

The mod Some Train Stations Are Optional (1.0.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event SomeTrainStationsAreOptional::on_train_changed_state (ID 31)
__SomeTrainStationsAreOptional__/control.lua:18: attempt to index field 'schedule' (a nil value)
stack traceback:
    __SomeTrainStationsAreOptional__/control.lua:18: in function <__SomeTrainStationsAreOptional__/control.lua:16>

From google search it is due to a timing issue I believe

13 hours ago
(updated 10 hours ago)

Thank you for the report! I have updated the mod (v1.0.2) to check the schedule pointer to ensure it is non-nil before using it. Please check if this resolves the issue.

New response