changed in control-
for ,car in pairs(cars) do
if car.name == "locomotive" then table.insert(locos,car) end
if car.name == "cargo-wagon" then table.insert(wagons,car) end
if car.name == "fluid-wagon" then table.insert(fluid_wagons,car) end
to -
for ,car in pairs(cars) do
if car.type == "locomotive" then table.insert(locos,car) end
if car.type == "cargo-wagon" then table.insert(wagons,car) end
if car.type == "fluid-wagon" then table.insert(fluid_wagons,car) end