The game throws the following error when trying to scale a train
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 86)
__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>
I took a peek on the code and line 2667 points to this function
train_scaling_config_target_slider = function(event)
local player = game.players[event.player_index]
local entity = player.opened
local station_config = global.enabled_stations[entity.surface.index][entity.force.name][entity.backer_name]
event.element.slider_value = math.floor(event.element.slider_value)
station_config.target = event.element.slider_value
if station_config.target == station_config.current then
station_config.target = nil
end
entity.last_user = game.players[event.player_index]
event.element.parent.train_scaling_config_target_textbox.text = event.element.slider_value
end,
Any ideas?