From 2726e06fe172cec2d449213671bd9fa2f8bf5b9a Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Tue, 17 Nov 2026 05:31:31 +0300 Subject: [PATCH 1/2] Fix TOOL:Reload on client Fixes: ```lua - [wire] addons/wire/lua/wire/stools/target_finder.lua:95: attempt to call field 'SetConvar' (a nil value) 1. Reload - addons/wire/lua/wire/stools/target_finder.lua:95 2. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/shared.lua:301 ``` --- lua/wire/stools/target_finder.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/wire/stools/target_finder.lua b/lua/wire/stools/target_finder.lua index 71d82621e9..86f617fabc 100644 --- a/lua/wire/stools/target_finder.lua +++ b/lua/wire/stools/target_finder.lua @@ -91,11 +91,16 @@ TOOL.ClientConVar = { } function TOOL:Reload(trace) + if CLIENT then + return true + end + if trace.Entity:IsValid() then WireLib.SetConvar(self:GetOwner(), "wire_target_finder_entityfil", trace.Entity:GetClass()) else WireLib.SetConvar(self:GetOwner(), "wire_target_finder_entityfil", "") end + return true end From 51f892e77fc0fdac9268a5b75a869fddfb6d1c62 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Tue, 17 Nov 2026 05:32:32 +0300 Subject: [PATCH 2/2] Simplify it --- lua/wire/stools/target_finder.lua | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lua/wire/stools/target_finder.lua b/lua/wire/stools/target_finder.lua index 86f617fabc..2f9fc4acd4 100644 --- a/lua/wire/stools/target_finder.lua +++ b/lua/wire/stools/target_finder.lua @@ -91,14 +91,8 @@ TOOL.ClientConVar = { } function TOOL:Reload(trace) - if CLIENT then - return true - end - - if trace.Entity:IsValid() then - WireLib.SetConvar(self:GetOwner(), "wire_target_finder_entityfil", trace.Entity:GetClass()) - else - WireLib.SetConvar(self:GetOwner(), "wire_target_finder_entityfil", "") + if SERVER then + WireLib.SetConvar(self:GetOwner(), "wire_target_finder_entityfil", trace.Entity:IsValid() and trace.Entity:GetClass() or "") end return true