DermaListView.DoDoubleClick

So I’m trying to run some code, this is what I’m doing:
[lua]
DermaListView.DoDoubleClick = function(parent, index, tlist)
RunConsoleCommand(“gp_shop_buy”, tlist:GetValue(1))
print(“gp_shop_buy “…tlist.GetValue(1)…” Has been ran in console.”)
end
[/lua]

my error



[lua\vgui\dlistview_line.lua:148] attempt to index local 'self' (a number value)


Does anybody know what could be causing the problem?

edit:

It’s different if I use index



[entities
pc_shop\cl_init.lua:56] attempt to index local 'index' (a number value)


Could we see whole code, I don’t think the error lies in what you posted.