Module:HeroData: Difference between revisions

Jump to navigation Jump to search
Sur (talk | contribs)
m get_json_item as p.
Sur (talk | contribs)
m nil check on previous
Line 14: Line 14:
-- returns the table of a specific item
-- returns the table of a specific item
p.get_json_item = function(frame)
p.get_json_item = function(frame)
name = frame.args[1]
local name = frame.args[1]
if (name == nil) then return "Name parameter missing" end
for i,v in pairs(data) do
for i,v in pairs(data) do
if (v["Name"] == name) then
if (v["Name"] == name) then