Anonymous

Module:Constants: Difference between revisions

From Melvor Idle
Use printError function
(Correct SlayerCoinsPerPoisonDamage description)
(Use printError function)
Line 687: Line 687:
return Shared.titleCase(styleNum)
return Shared.titleCase(styleNum)
end
end
return "ERROR: Invalid combat style[[Category:Pages with script errors]]"
return Shared.printError('Invalid combat style')
end
end


Line 707: Line 707:
function p.getSlayerTierByLevel(level)
function p.getSlayerTierByLevel(level)
if type(level) ~= 'number' or level < 1 then
if type(level) ~= 'number' or level < 1 then
return "ERROR: Invalid Slayer level [[Category:Pages with script errors]]"
return Shared.printError('Invalid Slayer level')
end
end
Line 728: Line 728:
end
end
end
end
return "ERROR: Invalid Slayer tier[[Category:Pages with script errors]]"
return Shared.printError('Invalid Slayer tier')
end
end


Line 736: Line 736:
return tier.display
return tier.display
else
else
return "ERROR: Invalid Slayer tier[[Category:Pages with script errors]]"
return Shared.printError('Invalid Slayer tier')
end
end
end
end
Line 782: Line 782:


if modName == nil then
if modName == nil then
return 'ERROR: Invalid modifier type for ' .. modifier .. '[[Category:Pages with script errors]]'
return Shared.printError('Invalid modifier type for "' .. modifier .. '"')
end
end
Line 938: Line 938:
local baseName = p.getModifierDetails(modifier)
local baseName = p.getModifierDetails(modifier)
if baseName == nil then
if baseName == nil then
return { 'ERROR: Modifier '..modifier..' is invalid' }
return { Shared.printError('Modifier "' .. modifier .. '" is invalid') }
end
end