Page 1 of 1

[2.0.19] Crash when exploring chunks and mod script is destroying any enemy entities found on Vulcanus.

Posted: Mon Nov 18, 2024 2:13 am
by Oarc
Log file attached. Not exactly sure, but seems related to me destroying demolishers via script?

I was charting a lot of chunks awhile testing my mod, and in each chunk in some areas of the map, I call entity.destroy() on any enemy entites found.
Was mostly working fine, until it crashed.

Code: Select all

---@param surface LuaSurface
---@param area BoundingBox
---@return nil
function RemoveEnemiesInArea(surface, area)
    for _, entity in pairs(surface.find_entities_filtered { area = area, force = "enemy" }) do
        entity.destroy()
    end
end
Thanks!

Re: [2.0.19] Crash when exploring chunks and mod script is destroying any enemy entities found on Vulcanus.

Posted: Fri Nov 22, 2024 12:26 am
by Loewchen