Constructron-Continued

by ILLISIS

An automated Spidertron; has the ability to move, set logistic requests, construct, deconstruct, repair and upgrade entities/blueprints of any size, anywhere on the map with items from your logistic network for the ultimate fire and forget automation and megabase quality of life experience with unmatched scaling potential.

Tweaks
2 months ago
1.1
22.9K

b Error on reset all [resolved]

1 year, 3 months ago
(updated 1 year, 3 months ago)

Hi,

when using the comand "/ctron reset all" the following error is thrown:
Error while running command "ctron": Constructron-Continued/script/pathfinder.lua:48: attempt to index field 'job' (a number value)
stack traceback:
Constructron-Continued/script/pathfinder.lua:48: in function 'init_path_request'
Constructron-Continued/script/command_functions.lua:185: in function 'recall_ctrons'
Constructron-Continued/control.lua:115: in function '?'
Constructron-Continued/control.lua:324: in function <Constructron-Continued/control.lua:317>

This occurs becouse the variable "job" is in this case a number when i should either be nil or a "job".
This is because of the following code in command_functions.lua:
for _, constructron in pairs(constructrons) do
local closest_station = ctron.get_closest_service_station(constructron)
pathfinder.init_path_request(constructron, closest_station.position, _) -- find path to station
end

The underscore in line 185 is a (garbage) variable that contains the key of the contructron-pairs.
The intention is to give no job as parameter, this should be achieved by nil instead of the underscore.

So to fix the error.
Change Line 185 in command_functions.lua to:
pathfinder.init_path_request(constructron, closest_station.position, nil)

1 year, 3 months ago

same for me

1 year, 3 months ago

Hi
This will be fixed in the next release ~11 hours.