[Solved]cancel_crafting error 'invalid crafting queqe index'
Posted: Wed Mar 20, 2019 2:12 pm
I'm trying to undo the player craft using this command:
Craft is canceled, but I get an error.
before: after: This is probably due to the fact that if the intermediate product is canceled(blue slot), the main product is also canceled, and as a result, the main product index becomes invalid.
If in the crafting queue no intermediate products, the error does not appear.
I also tried using these indexes.But the result is even worse:
What should I do?
Code: Select all
/c for i, option in pairs(game.player.crafting_queue) do game.player.cancel_crafting({index=1,count=option['count']}) end
before: after: This is probably due to the fact that if the intermediate product is canceled(blue slot), the main product is also canceled, and as a result, the main product index becomes invalid.
If in the crafting queue no intermediate products, the error does not appear.
I also tried using these indexes.But the result is even worse:
Code: Select all
/c for i, option in pairs(game.player.crafting_queue) do game.player.cancel_crafting({index=option['index'],count=option['count']}) end
/c for i, option in pairs(game.player.crafting_queue) do game.player.cancel_crafting({index=i,count=option['count']}) end