Help me with point shop :O

Hi all. Once again I need help. I have a problem with the shop points. When joining a server appears [cl_pointshop.lua: 178] attempt to index field ‘_Hats’ (a nil value). After that, all hats disappear. How do I fix this?


usermessage.Hook("PointShop_AddHat", function(um)
        local ply = um:ReadEntity()
        local item_id = um:ReadString()
        
        if not ply or not item_id then return end
        
        local item = POINTSHOP.FindItemByID(item_id)
        if not item then return end
        
        if not ply._Hats then
                ply._Hats = {}
        end
        
        if ply._Hats[item_id] then return end ------- Problem here D:
        
        local mdl = ClientsideModel(item.Model, RENDERGROUP_OPAQUE)
        mdl:SetNoDraw(true)
        
        ply._Hats[item_id] = {
                Model = mdl,
                Attachment = item.Attachment or nil,
                Bone = item.Bone or nil,
                Modify = item.Functions.ModifyHat or function(ent, pos, ang) return ent, pos, ang end
        }
end)

Did you get revision 61? I heard anything past that didn’t work. I never got this error and I have revision 61.

What is line 178?

How do I know what revision?

where is _Hats called?