So me and a couple of friends decided to download and update an old gamemode created for gmod 12 so we could play it on a private server and upload it to workshop for others to download (since their isn’t an updated version of the gamemode on workshop). We were able to update its files so we could select it from the menu but our knowledge on coding ends there. We ran into an error with the gamemode that is displayed below:
[ERROR] gamemodes/gofish/gamemode/cl_init.lua:160: attempt to index field 'rod' (a nil value) 1. unknown - gamemodes/gofish/gamemode/cl_init.lua:160
With line 160 being:
local w = 8 + self.rod:GetIconSize() + 8 + self.hook:GetIconSize() + 8 + self.bait:GetIconSize() + 8
which is nested in:
function PANEL:Paint() local w = 8 + self.rod:GetIconSize() + 8 + self.hook:GetIconSize() + 8 + self.bait:GetIconSize() + 8 local h = 8 + self.rod:GetIconSize() + 8 + self.volume:GetTall() + 8 draw.RoundedBox( 8, 0, 0, w, h, Color(150, 150, 150, 255) ) draw.RoundedBox( 8, 0+3, 0+3, w-6, h-6, Color(50, 50, 50, 255) ) end
Does anybody know how to fix this problem?