The following code snippet:
for weight, item in itemlist do
weight_total=weight_total+weight
end
is causing the error "attempt to call table value" on the first line in that snippet. Why?
Itemlist is a table of tables of weights and strings, like such:
local itemlist = {
{4,"weapon_pistol"},
{2,"weapon_357"},
...
Nothing is being called as far as I can tell; why is this error coming up?