bad key to string index (number expected, got string)

Error:


[@ShiftRP\gamemode\client\inventory.lua:220] bad key to string index (number expected, got string)

Script:
[lua] if Shift_Prestige[v].CanUse then
local PaU = vgui.Create(“DImageButton”, Pa)
PaU:SetPos(10,125)
PaU:SetImage(“gui/silkicons/wrench”)
PaU:SizeToContents()
PaU:SetToolTip(“Use Item”)
PaU.DoClick = function() --LINE 220
print("Test: "…v)
RunConsoleCommand(“shift_usepitem”, tostring(v))
end
end[/lua]

ShiftPrestige is a string not a table.

Fixed it now. Thanks.