Brave New World

by canidae

RTS-like scenario for Factorio. Player character is removed, all work must be done by bots

Scenarios
2 years ago
0.16 - 1.1
8.12K

b LuaItemStack Invalid

3 years ago

Game crash when a player left-clicks some recipes on the crafting menu. Modded Factorio!!!
Error report: on_player_crafted_item: LuaItemStack API call when LuaItemStack was invalid for read

here is a temporary solution:
script.on_event(defines.events.on_player_crafted_item, function(event)
...
if event.item_stack.valid_for_read then
game.players[event.player_index].cursor_ghost = event.item_stack.prototype
event.item_stack.count = 0
end
end)

New response