01-16-2015, 10:47 PM
To expand drewlt's answer:
I think that's pretty close to what you're looking for.
Code:
local total = 0
local inv = Inventory("itemid="..fishID)
if (inv) then
for k,item in pairs(inv) do
total = total + item.count
end
d("------------"..fishName..": "..total)
fishmanager.fishNamelabel = fishName
fishmanager.fishCount = tostring(total)
end
I think that's pretty close to what you're looking for.