1. The purpose of this code is to scan a tooltip and return the number of sockets the equipment has.

    Ive created a hidden tooltip and im able to scan the item but it is returning strange values. If i scan my head piece; which has 2 slots. then scan my neck piece, which has 1 slot. the second scan still return the same color socket as the second scan on the head piece. Basically, if i scan an item that has 2 slots and then scan one that has NO slots, the scan still returns the 2 slots from the previous scan instead of zero as it should.

    Im doing a :ClearLines before going to the next piece but it doesn't seem to really be clearing things, what am i missing?

    function TCoLScoreUsGemCheck()

    local gemModifier = 10 --missing gem subtraction modifier
    --DEFAULT_CHAT_FRAME:AddMessage("TCoL_ScoreUs Debug: itemID: " .. TCoL_itemID)
    TCoL_ScoreUs_Tooltip:ClearLines();
    TCoL_ScoreUs_Tooltip:SetHyperlink("item:"..TCoL_itemID) 
    for textureCount=1, 10 do
        local socketCheck = getglobal("TCoL_ScoreUs_TooltipTexture"..textureCount):GetTexture();
        if (socketCheck) and (socketCheck == "Interface\\ItemSocketingFrame\\UI-EmptySocket-Meta") then TCoL_socketCount = TCoL_socketCount + 1 end
        if (socketCheck) and (socketCheck == "Interface\\ItemSocketingFrame\\UI-EmptySocket-Blue") then TCoL_socketCount = TCoL_socketCount + 1 end
        if (socketCheck) and (socketCheck == "Interface\\ItemSocketingFrame\\UI-EmptySocket-Red") then TCoL_socketCount = TCoL_socketCount + 1 end
        if (socketCheck) and (socketCheck == "Interface\\ItemSocketingFrame\\UI-EmptySocket-Yellow") then TCoL_socketCount = TCoL_socketCount + 1 end
        if (socketCheck) then DEFAULT_CHAT_FRAME:AddMessage("TCoL_ScoreUs Debug: texture: ".."-"..textureCount.."-" .. socketCheck.."-"..textureCount.."-"..TCoL_itemLink) end
        if (socketID) then end --DEFAULT_CHAT_FRAME:AddMessage("TCoL_ScoreUs Debug: texture: " .. socketID) end
        socketCheck=""  
    end
    

    end

    I found the issue