can't remove a value from a table?

here is my code

[LUA]

local show_xp = {}
local show_xp_time = {}
local show_xp_pox = {}

local xp_am = 0
function show_add_xp(um)
xp_am = um:ReadString()
table.insert(show_xp,xp_am)
table.insert(show_xp_time,0)
table.insert(show_xp_pox,0)
end
usermessage.Hook( “show_add_xp”, show_add_xp );

function draw_xps()
–if tonumber(table.Count(show_xp)) > 0 then

for k,v in pairs(show_xp) do
draw.SimpleText("+"…tonumber(show_xp[k])…" XP"…show_xp_time[k], “Nazi”, hx,hy-show_xp_pox[k], Color(0,255,0,255))
show_xp_pox[k] = show_xp_pox[k] + 0.5
show_xp_time[k] = show_xp_time[k] + 1
if show_xp_time[k] > 499 then
table.remove( show_xp_pox, show_xp_pox[k] )
table.remove( show_xp_time, show_xp_time[k] )
table.remove( show_xp, show_xp[k] )
end
end

end
hook.Add(“HUDPaint”, “xppdrawing”, draw_xps)
[/LUA]

**[Table.remove

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Table.remove)**

what am i doing wrong?

table.remove takes a key, not a value.

thank you, i fixed it by using an variable

Doesn’t setting it to nil remove it?
Of course some traces may remain.