Module:Modifiers: Difference between revisions

Amend error handling
(Support v1.3 modifiers)
 
(Amend error handling)
Line 518: Line 518:
local modNS, modLocalID = Shared.getLocalID(modID)
local modNS, modLocalID = Shared.getLocalID(modID)
local modDefn = p.getModifierByID(modLocalID)
local modDefn = p.getModifierByID(modLocalID)
if modDefn == nil then
return Shared.printError('No modifier found with ID: ' .. (modLocalID or 'nil'))
end
local scopeDefn = p.getScope(modDefn, scopeData)
local scopeDefn = p.getScope(modDefn, scopeData)
local descTemplate = p.getDescriptionTemplate(scopeDefn, scopeData)
local descTemplate = p.getDescriptionTemplate(scopeDefn, scopeData)