Module:ModifierTables: Difference between revisions

_getModifierTable: Return an error message if the provided skill wasn't found rather than continuing
(_getModifierTable: Return an error message if the provided skill wasn't found rather than continuing)
Line 209: Line 209:
skill = nil
skill = nil
elseif type(skill) == 'string' then
elseif type(skill) == 'string' then
skill = Constants.getSkillID(skill)
local skillID = Constants.getSkillID(skill)
if skillID == nil then
return 'ERROR: Failed to find a skill ID for ' .. skill
else
skill = skillID
end
end
end