Module:Param Parse: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 456:
}
 
local resultparts = {}
local _, profession, knowledge, quest, min_weapon_strength =
for part in inputval:gmatch("(.-),(.-)%.-%sw+(.-),%.-%s+(.-),%.-%s+(.-)") do
table.insert(parts, part)
 
if not profession or not knowledge or not quest or not min_weapon_strength then
return "Invalid input"
end
 
local profession = {parts[1], parts[2]}
local profession_name, profession_value = profession:match("(%w+)%s+(%S+)")
local knowledge = parts[3]
 
local knowledge_valuequest = knowledgeparts[4]
local quest_valuemin_weapon_strength = questparts[5]
local min_weapon_strength_value = min_weapon_strength
 
local result = {
icon_map[profession] .. " " .. profession_value,
icon_map.knowledge .. " " .. knowledge_value,
icon_map.quest .. " " .. quest_value,
icon_map["min_weapon_strength"] .. " " .. min_weapon_strength_value
}
 
return tablestring.concatformat(result, ", ")
"%s %s, %s %s, %s %s, %s %s",
icon_map[profession[1]], .. " " .. profession_valueprofession[2],
icon_map.knowledge, .. " " .. knowledge_valueknowledge,
icon_map.quest, .. " " .. quest_valuequest,
icon_map[".min_weapon_strength"], .. " " .. min_weapon_strength_valuemin_weapon_strength
})
end
 
131

edits