ReikaKalseki / Reika_FactorioMods_Issues

The issue tracker for all of my Factorio mods - EndgameCombat, NauvisDay, Geothermal, Oreverhaul, and the rest.
5 stars 1 forks source link

Error #237

Closed BelZeqihr closed 4 years ago

BelZeqihr commented 4 years ago

The mod Endgame Combat caused a non-recoverable error. Please report this error to the mod author.

Error while running event EndgameCombat::on_built_entity (ID 6) The mod Mass Driver caused a non-recoverable error. Please report this error to the mod author.

Error while running event mass-driver::script_raised_built (ID 77) mass-driver/script/mass-driver.lua:282: attempt to index field 'entity' (a nil value) stack traceback: mass-driver/script/mass-driver.lua:282: in function <mass-driver/script/mass-driver.lua:281> stack traceback: EndgameCombat/control.lua:500: in function <EndgameCombat/control.lua:472> stack traceback: [C]: in function 'raise_event' EndgameCombat/control.lua:500: in function <EndgameCombat/control.lua:472>

calcwizard commented 4 years ago

The error has been fixed on my end.

ReikaKalseki commented 4 years ago

I am pretty sure I fixed this.

calcwizard commented 4 years ago

I took another look at it. Based on the API page for script_raised_built, I had expected the entity to be event.entity and didn't properly nil check it. Looking at the calling function, EndgameCombat provides the entity as event.created_entity.

ReikaKalseki commented 4 years ago

event.created_entity is correct...or did that change?

calcwizard commented 4 years ago

script_raised_built is entity, it's on_built_entity and on_robot_built_entity that uses created_entity

ReikaKalseki commented 4 years ago

Ah.