Hello, sometimes I have this error in console:
Code that returns this error - 050-function.lua:
But I have no idea what have to be done that player can have more than 100 items (is it possible?). Does anyone have any idea?
Code:
[Warning] getItemWeightById
Calculating weight for more than 100 items!
Code that returns this error - 050-function.lua:
Code:
function getItemWeightById(itemid, count, precision)
local item, count, precision = getItemInfo(itemid), count or 1, precision or false
if(not item) then
return false
end
if(count > 100) then
-- print a warning, as its impossible to have more than 100 stackable items without "cheating" the count
print('[Warning] getItemWeightById', 'Calculating weight for more than 100 items!')
end
local weight = item.weight * count
return precission and weight or math.round(weight, 2)
end
But I have no idea what have to be done that player can have more than 100 items (is it possible?). Does anyone have any idea?