Some Train Stations Are Optional

by gust334

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

Tweaks
22 days ago
2.0
83
Trains

b crash

23 days ago
(updated 23 days 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

22 days ago
(updated 22 days 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.

20 days ago

works like a charm now, thanks for the quick update :=)

New response