Module:HeroData: Difference between revisions

Sur (talk | contribs)
m Hero Comparison now has SpinUp (Revving) stats for McGinnis and eventually Vandal
Sur (talk | contribs)
m get_list_elem() if hero doesnt have that variable, return empty string instead
Line 83: Line 83:
if (hero == nil) then return "Hero " .. hero_name .. " not found" end
if (hero == nil) then return "Hero " .. hero_name .. " not found" end
local list = hero[var]
local list = hero[var]
if (list == nil) then return "Hero does not have " .. var .. " variable" end
if (list == nil) then return "" end
local element = list[number_int]
local element = list[number_int]
if (element == nil) then return "" end
if (element == nil) then return "" end