Page 1 of 1

[1.1.58] LuaControl.cancel_crafting gives wrong error message for missing argument

Posted: Sun May 08, 2022 6:02 pm
by Muppet9010
The below code snippet is invalid as it doesn't have the `count` field in the table argument.

Code: Select all

/c
local player = game.player
if player.crafting_queue_size > 0 then
    player.cancel_crafting {index =1}
end
However it gives the error message:
Error: 'index': real number expected got nil.
Tested while the player was crafting something.

Expected syntax:
https://lua-api.factorio.com/latest/Lua ... l_crafting
Correct syntax works as expected.

Code: Select all

player.cancel_crafting {index = 1, count = 1}

Re: [1.1.58] LuaControl.cancel_crafting gives wrong error message for missing argument

Posted: Wed May 11, 2022 5:27 am
by boskid
Fixed for 1.1.60.