[2.0.58] surface.create_entity() crashes with "quality is zero"

This subforum contains all the issues which we already resolved.
OilyMac
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Dec 20, 2021 4:57 am
Contact:

[2.0.58] surface.create_entity() crashes with "quality is zero"

Post by OilyMac »

Trying to create an item-on-ground via surface.create_entity() crashes if the stack item has quality. E.g.,

game.surfaces[event.surface_index].create_entity({name="item-on-ground", position=event.source_position, stack={name="iron-ore", count=1, quality="uncommon"}})

results in a crash:

Error while running event test_mod::on_script_trigger_effect (ID 170)
quality is zero
stack traceback:
[C]: in function 'create_entity'
__test_mod__/control.lua:72: in function <__test_mod__/control.lua:71>
Rseding91
Factorio Staff
Factorio Staff
Posts: 15832
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.58] surface.create_entity() crashes with "quality is zero"

Post by Rseding91 »

Thanks for the report. This is now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”