Editing Module:Param Parse
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 3: | Line 3: | ||
--]=] |
--]=] |
||
-- <nowiki> |
-- <nowiki> |
||
require('strict') |
|||
local Infobox = require('Module:Infobox') |
local Infobox = require('Module:Infobox') |
||
local currency = require('Module:Currency').parse |
local currency = require('Module:Currency').parse |
||
Line 35: | Line 34: | ||
return nil |
return nil |
||
end |
end |
||
num = parse.number(out) |
|||
if num == nil then |
if num == nil then |
||
return nil |
return nil |
||
Line 319: | Line 318: | ||
-- Value |
-- Value |
||
function parse.value_func(val) |
function parse.value_func(val) |
||
⚫ | |||
local status, val = pcall(currency, val) |
|||
if status then |
|||
⚫ | |||
end |
|||
end |
end |
||
parse.value = { |
parse.value = { |
||
Line 532: | Line 528: | ||
local level_valid = parse.number(level) |
local level_valid = parse.number(level) |
||
local profession_valid = parse.has_content(profession) |
local profession_valid = parse.has_content(profession) |
||
local profession_valid_link = profession_valid |
|||
if not profession_valid and not level_valid then |
if not profession_valid and not level_valid then |
||
Line 549: | Line 544: | ||
end |
end |
||
return '[[File:'..profession_valid..'_icon.png|link='.. |
return '[[File:'..profession_valid..'_icon.png|link='..profession_valid..'|width=18x18]] '..level_valid |
||
end |
end |
||