Anonymous

Module:Items: Difference between revisions

From Melvor Idle
Added proper handling for pagenames with apostrophes
(Added getItems function)
(Added proper handling for pagenames with apostrophes)
Line 76: Line 76:
   name = string.gsub(name, "%%27", "'")
   name = string.gsub(name, "%%27", "'")
   name = string.gsub(name, "'", "'")
   name = string.gsub(name, "'", "'")
  name = string.gsub(name, "'", "'")
   for i, item in pairs(ItemData.Items) do
   for i, item in pairs(ItemData.Items) do
     if(item.name == name) then
     if(item.name == name) then