[1.1.58] LuaControl.cancel_crafting gives wrong error message for missing argument
Posted: Sun May 08, 2022 6:02 pm
The below code snippet is invalid as it doesn't have the `count` field in the table argument.
However it gives the error message:
Expected syntax:
https://lua-api.factorio.com/latest/Lua ... l_crafting
Correct syntax works as expected.
Code: Select all
/c
local player = game.player
if player.crafting_queue_size > 0 then
player.cancel_crafting {index =1}
end
Tested while the player was crafting something.Error: 'index': real number expected got nil.
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}