Train Limit Linter


Displays info about train schedules and train limits. Allows the easy creation of new trains.

Utilities
a month ago
1.1
367
Trains Blueprints

b Mod does not check for existence of remote calls

2 days ago

Error AppManagerStates.cpp:1659: The mod Train Limit Linter (1.0.32) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event train-limit-linter::on_load()
No such function: space-exploration.get_on_train_teleport_started_event
stack traceback:
[C]: in function 'call'
train-limit-linter/scripts/remote_events.lua:37: in function 'handle_remote_events'
train-limit-linter/control.lua:620: in function <train-limit-linter/control.lua:619>

2 days ago

Thanks for the report. Would you mind uploading your save so that I can reproduce the issue? The easiest way for me would be if you were able to create a GitHub issue here: https://github.com/mheidal/train-limit-linter/issues and attach the save file there, if it's <100 MB.

2 days ago

The save I originally tried it on is massive and I cannot easily make that available. I will have a look again in the evening to check if I can make it fail again in this manner.
But really the issue is here https://github.com/mheidal/train-limit-linter/blob/main/scripts/remote_events.lua#L35 where you outright assume that if there is a "space-exploration" remote, it will definitely have all the functions you call within that block. Even when those remote calls have only been available on more recent versions of SE. Simply checking for remote.interfaces["space-exploration"]["function-to-call"] before actually calling it should solve the issue.

New response