Page 1 of 1

[Resolved] Natural_Evolution_Enemies::on_trigger_created_entity (ID 22)

Posted: Tue May 22, 2018 4:10 pm
by TheSAguy
Hi,

I updated my mod to have biters attack when cliffs get bombed. In testing I found no errors and all seemed to work fine, but I've gotten a few crash reports.

They are:
Image

and
Error
I've attached the mod. I've also attached a save from the first error report, but I can't load it, get this error:
Error
Here is the code that is erroring out: (it's the "if settings" line

Code: Select all

script.on_event(defines.events.on_trigger_created_entity, function(event)
	
	local entity = event.entity	

    if settings.startup["NE_Tree_Hugger"].value and global.cliff_explosive[entity.name] then
		writeDebug("Cliff Bombed")
		Look_and_Attack(entity, 2)
    end	

end)
Again, everything seems to work when I test it in new games.
Thanks for taking a look.

Re: Natural_Evolution_Enemies::on_trigger_created_entity (ID 22)

Posted: Tue May 22, 2018 5:55 pm
by Bilka
Cliffs also destroy/change cliffs around them when they get destroyed, but that shouldnt affect your trigger_created_entity.... Seems a whole lot like the event is raised on an invalid entity, which should never happen, so that would be a bug in the game.