As topic says, function tradecount() is counting equipment, and i belive it shouldnt.
Example:
ITEMS = {"longsword", "copper shield", "chain armor", "steel shield", "battle axe", "morning star", "plate legs", "double axe", "steel helmet", "halberd", "two handed sword"}
for _, item in ipairs(ITEMS) do
while tradecount("sell", item) > 0 do
sellitems(item, 100)
waitping()
end
end
In this case, its trying to sell plate legs/steel helmet which i wear on my noobchar