Page 1 of 1

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

Posted: Fri Jul 04, 2025 2:48 pm
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>

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

Posted: Fri Jul 04, 2025 7:42 pm
by Rseding91
Thanks for the report. This is now fixed for the next release.