17,097
edits
(getItemUseTable: Resolve Summoning tablets with no non-shard item costs being excluded from output) |
(Use printError function) |
||
Line 370: | Line 370: | ||
end | end | ||
if item == nil then | if item == nil then | ||
return | return Shared.printError('No item named "' .. itemName .. '" exists in the data module') | ||
end | end | ||
Line 588: | Line 588: | ||
local matQty = itemCost.quantity or itemCost[2] or 1 | local matQty = itemCost.quantity or itemCost[2] or 1 | ||
if matItem == nil then | if matItem == nil then | ||
table.insert(matRow, ' | table.insert(matRow, Shared.printError('Failed to find item with ID "' .. itemCost.id .. '"')) | ||
elseif type(matQty) == 'number' then | elseif type(matQty) == 'number' then | ||
table.insert(matRow, Icons.Icon({matItem.name, type='item', qty=matQty})) | table.insert(matRow, Icons.Icon({matItem.name, type='item', qty=matQty})) | ||
Line 661: | Line 661: | ||
local item = Items.getItem(itemName) | local item = Items.getItem(itemName) | ||
if item == nil then | if item == nil then | ||
return | return Shared.printError('No item named "' .. itemName .. '" exists in the data module') | ||
end | end | ||
Line 720: | Line 720: | ||
local item = Items.getItem(itemName) | local item = Items.getItem(itemName) | ||
if item == nil then | if item == nil then | ||
return | return Shared.printError('No item named "' .. itemName .. '" exists in the data module') | ||
end | end | ||