[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: 201
Joined: Thu Apr 07, 2016 1:36 pm
Contact:

[Rseding91] [16.30] Crash on_pre_player_crafted_item

Post by WIZ4 » Wed Mar 14, 2018 1:04 pm

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 48 times
My native language is russian. Sorry if my messages are difficult to read.

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

Re: [16.30] Crash on_pre_player_crafted_item

Post by Bilka » Wed Mar 14, 2018 1:10 pm

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: 201
Joined: Thu Apr 07, 2016 1:36 pm
Contact:

Re: [16.30] Crash on_pre_player_crafted_item

Post by WIZ4 » Wed Mar 14, 2018 1:55 pm

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: 9453
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [16.30] Crash on_pre_player_crafted_item

Post by Rseding91 » Thu Mar 15, 2018 4:35 pm

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”

Who is online

Users browsing this forum: No registered users