Module:ReturnImageForTemplate: Difference between revisions

From Resonite Wiki
uhh idk
try again
Line 7: Line 7:
   local i = 1;
   local i = 1;
   local text = "";
   local text = "";
   for i=1, args[3] do
   for i=1, frame.args[3] do
     text = text .. frame:getParent().args[i];
     text = text .. frame:getParent().args[i];
   end
   end

Revision as of 22:42, 10 February 2024

Example of how to use this is on Template:GetDirectionNodePage


local p = {}


function p.ReturnImage( frame )
  mw.logObject(frame:getParent());
  local i = 1;
  local text = "";
  for i=1, frame.args[3] do
    text = text .. frame:getParent().args[i];
  end
  
  return frame.args[1] .. text .. frame.args[2];
end

return p