[2.1.12] LuaPlayer::drag_wire(): Returned value described as a boolean, actual return is a table.
-
MeteorSwarm
- Long Handed Inserter

- Posts: 58
- Joined: Thu Sep 25, 2025 10:49 pm
- Contact:
[2.1.12] LuaPlayer::drag_wire(): Returned value described as a boolean, actual return is a table.
The current description of the output of LuaPlayer::drag_wire() is incorrect. It is described as a boolean in the documentation, but the actual output is a table containing the position dragged from.
Re: [2.1.12] LuaPlayer::drag_wire(): Returned value described as a boolean, actual return is a table.
Moving this to bug reports, it looks like the return value of the C++ wire dragging logic isn't returned to Lua as it should be, despite the method being marked as returning one value. The position value you're seeing is your own input to the method because it's the latest thing on the Lua stack.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: [2.1.12] LuaPlayer::drag_wire(): Returned value described as a boolean, actual return is a table.
Looks like this was broken since first 2.0 release. This is now fixed for 2.1.18.
