The two get_trains links are swapped in http://lua-api.factorio.com/latest/Classes.html
get_trains(surface) → array of LuaTrain links to LuaForce.get_trains
get_trains(force) → array of LuaTrain links to LuaSurface.get_trains
swapped links in api documentation
Re: swapped links in api documentation
That sounds correct to me. The first get_trains(surface) is in LuaForce, and the second get_trains(force) is in LuaSurface, so the links take you to the correct place. So you'd do either `game.player.force.get_trains(game.player.surface)` or `game.player.surface.get_trains(game.player.force)`.
Re: swapped links in api documentation
My bad I was confused by LuaSurface showing get_trains(force).
My Mods: mods.factorio.com