[Resolved] Natural_Evolution_Enemies::on_trigger_created_entity (ID 22)

Place to get help with not working mods / modding interface.
TheSAguy
Smart Inserter
Smart Inserter
Posts: 1456
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

[Resolved] Natural_Evolution_Enemies::on_trigger_created_entity (ID 22)

Post 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.
Attachments
_autosave3.zip
Save
(6.95 MiB) Downloaded 57 times
Natural_Evolution_Enemies_8.1.3.zip
MOD
(210.53 KiB) Downloaded 54 times
Last edited by TheSAguy on Wed May 23, 2018 6:43 pm, edited 1 time in total.
Bilka
Factorio Staff
Factorio Staff
Posts: 3470
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Natural_Evolution_Enemies::on_trigger_created_entity (ID 22)

Post 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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Modding help”