Anonymous

Module:CombatAreas: Difference between revisions

From Melvor Idle
Use printError function
(getExpansionIcon: Implement)
(Use printError function)
Line 64: Line 64:
local area = p.getArea(areaName)
local area = p.getArea(areaName)
if area == nil then
if area == nil then
return "ERROR: No area named " .. areaName .. " exists in the data module[[Category:Pages with script errors]]"
return Shared.printError('No area named "' .. areaName .. '" exists in the data module')
end
end
Line 97: Line 97:
end
end
else
else
table.insert(reqArray, 'ERROR: Unknown requirement type ' .. (reqDetails.type or 'nil') .. '[[Category:Pages with script errors]]')
table.insert(reqArray, Shared.printError('Unknown requirement type ' .. (reqDetails.type or 'nil')))
end
end
end
end
Line 142: Line 142:
local area = p.getArea(areaName)
local area = p.getArea(areaName)
if area == nil then
if area == nil then
return "ERROR: Could not find an area named "..areaName
return Shared.printError('No area named "' .. areaName .. '" exists in the data module')
end
end


Line 162: Line 162:
local area = p.getArea(areaName)
local area = p.getArea(areaName)
if area == nil then
if area == nil then
return "ERROR: Could not find an area named "..areaName
return Shared.printError('No area named "' .. areaName .. '" exists in the data module')
end
end