Skip to content

Check if MyEntId isnt nil - #3721

Merged
Astralcircle merged 2 commits into
masterfrom
fix-wiremotor-nil-error
Sep 18, 2026
Merged

Astralcircle merged 2 commits into
masterfrom
fix-wiremotor-nil-error

Conversation

@wrefgtzweve

Copy link
Copy Markdown
Member

Fixes:

- addons/wire/lua/entities/gmod_wire_motor.lua:58: table index is nil
1. <unknown> - addons/wire/lua/entities/gmod_wire_motor.lua:58
 2. xpcall - [C]:-1
  3. CreateEntityFromTable - addons/advdupe2/lua/advdupe2/sv_clipboard.lua:1058
   4. <unknown> - addons/advdupe2/lua/advdupe2/sv_clipboard.lua:1334
    5. pcall - [C]:-1
     6. <unknown> - addons/advdupe2/lua/advdupe2/sv_clipboard.lua:1541
      7. <unknown> - addons/kaki/lua/includes/modules/hook.lua:335

This can happen if a malformed dupe or a gmod_wire_motor without a constraint is spawned.
gmod_wire_motor can exist without as constraint.Motor can return a nil if the constraint failed to be created.

@Astralcircle

Copy link
Copy Markdown
Member

I think you can add check also here, i remember it errored too

@Astralcircle
Astralcircle merged commit 0a93f49 into master Sep 18, 2026
1 check failed
@Astralcircle
Astralcircle deleted the fix-wiremotor-nil-error branch September 19, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants