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

Bugs which we just recently fixed in our development version and will reach you in the next release.
MeteorSwarm
Long Handed Inserter
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.

Post by MeteorSwarm »

07-25-2026, 18-26-47.png
07-25-2026, 18-26-47.png (107.45 KiB) Viewed 351 times
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.
Bilka
Factorio Staff
Factorio Staff
Posts: 3865
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [2.1.12] LuaPlayer::drag_wire(): Returned value described as a boolean, actual return is a table.

Post by Bilka »

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.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4839
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.1.12] LuaPlayer::drag_wire(): Returned value described as a boolean, actual return is a table.

Post by boskid »

Looks like this was broken since first 2.0 release. This is now fixed for 2.1.18.
Post Reply

Return to “Resolved for the next release”