small error help please.

so when i try to buy a an item from the store, the console pops up with this error and doesnt give me the entity which is a weapon:

ERROR: Hook ‘FishingmodEntity:HUDPaint’ Failed: [entities\entity_fishing_rod\cl_init.lua:47] attempt to index a boolean value
Removing Hook ‘FishingmodEntity:HUDPaint’

here is the area

function ENT:HUDPaint()
if self:GetPlayer() and not self:GetPlayer().fishingmod then return end

if self:GetPlayer() ~= LocalPlayer() and self:GetHook() and self:GetHook():GetPos():Distance(LocalPlayer():EyePos()) > 1500 then return end
local xy = ((self:GetBobber() and self:GetBobber():GetPos() or Vector(0)) + Vector(0,0,10)):ToScreen()

local depth = ""
if self:GetHook() and self:GetHook():WaterLevel() >= 1 then
	depth =  "

Depth: " … tostring(math.Round((self:GetDepth()2.54)/10010)/10)

local catch = ""
local hooked_entity = self:GetHook() and self:GetHook():GetHookedEntity()
if hooked_entity and hooked_entity:WaterLevel() == 0 and hooked_entity:GetPos():Distance(LocalPlayer():EyePos()) < 500 then
	catch = "

Catch: " … hooked_entity:GetNWString(“fishingmod friendly”)
local height_offset = 50
draw.DrawText(self:GetPlayer().fishingmod “ChatFont” ,xy.x, xy.y-115-height_offset, color_white, 1)
draw.RoundedBox( 0, xy.x-50, xy.y-88-height_offset, 100, 23, Color( 255, 255, 255, 100 ) )
draw.RoundedBox( 0, xy.x-50, xy.y-88-height_offset, self:GetPlayer().fishingmod.percent, 23, Color( 0, 255, 0, 150 ) )
draw.DrawText(tostring(math.Round(self:GetPlayer().fishingmod.expleft)), “HudSelectionText” ,xy.x, xy.y-85-height_offset, color_black, 1)
draw.DrawText("Total Catch: " … self:GetPlayer().fishingmod.catches … "
Money: " … (self:GetPlayer() or “0”) … "
Level: " … self:GetPlayer().fishingmod.level … "
Length: " … tostring(math.Round((self:GetLength()2.54)/10010)/10) … depth … catch, “HudSelectionText”, xy.x,xy.y-60-height_offset, hooked_entity and Color(0,255,0,255) or color_white,1)

Which line is line 47?

There is a mistake here though:

draw.DrawText(self:GetPlayer().fishingmod “ChatFont” ,xy.x, xy.y-115-height_offset, color_white, 1)

For one, there’s a comma missing, and the rest of your code seems to treat fishingmod as a table, yet you’re trying to use it in draw.DrawText?

right, sorry, that part you have there is line 47. where’s it missing a comma though?

[lua]self:GetPlayer().fishingmod “ChatFont”[/lua]

[lua]self:GetPlayer().fishingmod ,“ChatFont”[/lua]
so thats it?

Yeah, but if fishgingmod is still a table that will throw you an error.

ok, first off, im using city rpg as the gamemode. and its giving me this error. ive used sandbox and darkrp and it throws no errors at all and everything works properly.

What error?

ERROR: Hook ‘FishingmodEntity:HUDPaint’ Failed: [entities\entity_fishing_rod\cl_init.lua:47] attempt to index a boolean value
Removing Hook ‘FishingmodEntity:HUDPaint’

and this is line 47 [lua]draw.DrawText(self:GetPlayer().fishingmod “ChatFont” ,xy.x, xy.y-115-height_offset, color_white, 1)[/lua]
i dont see as to why it would give this error on this gamemode yet work fine before.

That wont work on any gamemode, it should be:

draw.DrawText(self:GetPlayer().fishingmod, “ChatFont” ,xy.x, xy.y-115-height_offset, color_white, 1)[/lua]

But as I keep saying, that probably wont work as self:GetPlayer().fishingmod is a table, you can only draw strings.