Module:HeroData: Difference between revisions

Jump to navigation Jump to search
Sur (talk | contribs)
m local prefix on types and abbrevs vars
Sur (talk | contribs)
m hero != hero_data typo
Line 44: Line 44:
local hero_stat_key = frame.args[2]
local hero_stat_key = frame.args[2]
local hero_data = get_json_item(hero_name)
local hero_data = get_json_item(hero_name)
if(hero == nil) then return "Hero Not Found" end
if(hero_data == nil) then return "Hero Not Found" end
return p.get_hero_scalar_str(hero_data, hero_stat_key) --surely theres a better way
return p.get_hero_scalar_str(hero_data, hero_stat_key) --surely theres a better way
end
end