[Rseding91] [16.30] Crash on_pre_player_crafted_item
Posted: Wed Mar 14, 2018 1:04 pm
I used this event in control.lua
As soon as I started craft, i got crash. Apparently because of cancel_crafting() i wrote wrong
Code: Select all
script.on_event(defines.events.on_pre_player_crafted_item, function(event)
local player = game.players[event.player_index]
if event.recipe then
player.cancel_crafting()
end
end)