[Rseding91] [16.30] Crash on_pre_player_crafted_item

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
WIZ4
Fast Inserter
Fast Inserter
Posts: 209
Joined: Thu Apr 07, 2016 1:36 pm
Contact:

[Rseding91] [16.30] Crash on_pre_player_crafted_item

Post by WIZ4 »

I used this event in control.lua

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)
As soon as I started craft, i got crash. Apparently because of cancel_crafting() i wrote wrong
factorio-current.log
(28.34 KiB) Downloaded 152 times
My native language is russian. Sorry if my messages are difficult to read.

Bilka
Factorio Staff
Factorio Staff
Posts: 3128
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [16.30] Crash on_pre_player_crafted_item

Post by Bilka »

16586.416 Time travel logging:
:D
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
WIZ4
Fast Inserter
Fast Inserter
Posts: 209
Joined: Thu Apr 07, 2016 1:36 pm
Contact:

Re: [16.30] Crash on_pre_player_crafted_item

Post by WIZ4 »

Bilka wrote:
16586.416 Time travel logging:
:D
What this?
My native language is russian. Sorry if my messages are difficult to read.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [16.30] Crash on_pre_player_crafted_item

Post by Rseding91 »

Thanks for the report. It's now fixed for the next version of 0.16. The problem is you're passing the wrong number of arguments to cancel_crafting().
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”