Skip to content

[Bug]: Frequent OnAdjacentTo error #6425

@lL1l1

Description

@lL1l1

Describe the Bug

Originates from #6093. The new ZXA0003 unit seems to cause a bug with adjacency since adjacency expects a Unit.EntityId but DummyUnit does not assign self.EntityId.
The line numbers below are modified to include my warning code of which adjacent unit doesn't have the entity ID, the correct line is 787 instead of 790.

warning: adjacent unit does not have self.EntityId: zxa0003
warning: Error running OnAdjacentTo script in Entity ueb0302 at 1b9ffe08: ...\documents\github\fa\lua\sim\units\structureunit.lua(790): table index is nil
         stack traceback:
         	...\documents\github\fa\lua\sim\units\structureunit.lua(790): in function <...\documents\github\fa\lua\sim\units\structureunit.lua:776>

Reproduce the bug

Replay 23216422

Screenshots

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions