17,105
edits
(_getCategoryTable: Fix skill cape classification for Superior Cape of Completion) |
(Use printError function) |
||
Line 28: | Line 28: | ||
if Shared.tableIsEmpty(itemList) then | if Shared.tableIsEmpty(itemList) then | ||
return ' | return Shared.printError('You must select at least one item to get stats for') | ||
end | end | ||
Line 344: | Line 344: | ||
local itemList = {} | local itemList = {} | ||
local errMsg = ' | local errMsg = 'Some items not found in database: ' | ||
local hasErr = false | local hasErr = false | ||
for i, name in Shared.skpairs(itemNames) do | for i, name in Shared.skpairs(itemNames) do | ||
Line 357: | Line 357: | ||
if hasErr then | if hasErr then | ||
return errMsg | return Shared.printError(errMsg) | ||
else | else | ||
return p._getEquipmentTable(itemList, includeModifiers) | return p._getEquipmentTable(itemList, includeModifiers) | ||
Line 473: | Line 473: | ||
else | else | ||
if Constants.getEquipmentSlotID(category) == nil then | if Constants.getEquipmentSlotID(category) == nil then | ||
return ' | return Shared.printError('Invalid option. Choose either an equipment slot, Potion, or Other') | ||
end | end | ||
isEquipment = true | isEquipment = true |