Train Scaling


Automate the construction and deconstruction of your trains! Configure a train currently scheduled for a station as a template for the station - the mod's special train construction station will automatically build (or destroy) copies of the template train on demand, or in response to circuit conditions.

Content
3 years ago
0.16 - 1.1
5.91K
Trains

b Another Crash on 1.1.0

3 years ago

Happened when I increased the number of deployed trains of selected template from 2 to 6. The supply crates for the scaling station were empty. The trains consisted of only modded cars: one electric engine MK3 and four MK3 cargo wagons.

Error while running event train-scaling::on_gui_text_changed (ID 2)
train-scaling/control.lua:2684: bad argument #1 of 2 to 'newindex' (string expected, got number)
stack traceback:
[C]: in function '__newindex'
__train-scaling
/control.lua:2684: in function '?'
train-scaling/control.lua:2849: in function <train-scaling/control.lua:2843>

3 years ago

I have a similar error:
The mod Train Scaling (1.1.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event train-scaling::on_gui_value_changed (ID 87)
train-scaling/control.lua:2667: bad argument #1 of 2 to 'newindex' (string expected, got number)
stack traceback:
[C]: in function '__newindex'
__train-scaling
/control.lua:2667: in function '?'
train-scaling/control.lua:2849: in function <train-scaling/control.lua:2843>

3 years ago

This happens when one uses the slider instead of the input field to change the value.
I guess the slider value is a number type and the function expects a string.

3 years ago

I've submitted a pull request to fix this at https://github.com/shanemadden/factorio-train-scaling/pull/12

New response