Module:ItemData: Difference between revisions

mNo edit summary
One Bar (talk | contribs)
m Fix string to number conversion
Line 46: Line 46:
local item = get_json_item(item_name)
local item = get_json_item(item_name)
if(item == nil) then return "<span style=\"color:red;\">Item Not Found.</span>" end
if(item == nil) then return "<span style=\"color:red;\">Item Not Found.</span>" end
local cost = 0
return tonumber(item["Cost"])
cost = cost + item["Cost"]
return cost
end
end