wiremod / wire-extras

Community Contributed Wire Extras Repository (formerly UWSVN). These are addons which may be of use to wiremodders but do not undergo the same level of critique that the official repos do.
Apache License 2.0
83 stars 67 forks source link

Gui Wiring tool breaks game #103

Closed Endleon201 closed 3 years ago

Endleon201 commented 3 years ago

When I use said tool on unwired parts, it works perfectly. The second I try to use it on already wired together parts, it whites out my screen and sends the following error:

[wire-extras] addons/wire-extras/lua/weapons/gmod_tool/stools/gui_wiring.lua:157: attempt to concatenate local 'port' (a nil value)

  1. GUIWiring_GetEntPortKey - addons/wire-extras/lua/weapons/gmod_tool/stools/gui_wiring.lua:157
    1. GUIWiring_ShowGUI - addons/wire-extras/lua/weapons/gmod_tool/stools/gui_wiring.lua:266
    2. func - addons/wire-extras/lua/weapons/gmod_tool/stools/gui_wiring.lua:127
      1. unknown - lua/includes/extensions/net.lua:32

I don't know enough Lua to understand exactly what happened, so please explain to me if I'm doing anything stupid.

thegrb93 commented 3 years ago

It's definitely the tool's fault

Endleon201 commented 3 years ago

It's definitely the tool's fault

Than how can I fix it?

thegrb93 commented 3 years ago

Need to debug and fix the lua code

Endleon201 commented 3 years ago

Need to debug and fix the lua code

Who will get on this?

thegrb93 commented 3 years ago

The problem is here: https://github.com/wiremod/wire-extras/blob/master/lua/weapons/gmod_tool/stools/gui_wiring.lua#L266 port0 has 'nil' Name

Endleon201 commented 3 years ago

The problem is here: https://github.com/wiremod/wire-extras/blob/master/lua/weapons/gmod_tool/stools/gui_wiring.lua#L266 port0 has 'nil' Name

Do I remove said line??

thegrb93 commented 3 years ago

No, need to figure out what the contents of the tables are and see why Name is nil.

thegrb93 commented 3 years ago

Looks like d20c969c2fd6d80f4ed2db636f69aa6b99fcb641 caused the issue