Help find train
Posted: Tue Feb 23, 2021 4:14 pm
In my base I got a lot of trains. All of them of the same length. Except for one that is incorrect by mistake. How can I find it?
Code: Select all
/c length = 6
for _, train in pairs(game.player.force.get_trains()) do
if #train.carriages ~= length then
game.player.print("[gps=".. train.carriages[1].position.x ..",".. train.carriages[1].position.y .."]")
end
end