Module:Sandbox/DD4235/Military Decorations

militaryDecorations = {} militaryDecorations.hello = function return "Hello, world from a LUA script" end

militaryDecorations.makeTemplate = function(frame) strOut = frame.args.pre and " " or "" strOut = strOut .. "{|class='wikitable'\n" row = 1 col = 1 while frame.args[row.."-"..col.."-name"] or frame.args[row.."-"..col.."-ribbon"] do		if row ~= 1 then strOut = strOut.."|-\n" end while frame.args[row.."-"..col.."-name"] or frame.args[row.."-"..col.."-ribbon"] do strOut = strOut.. "|\n" col = col + 1 end col = 1 row = row + 1 end strOut = strOut.."|}\n" return strOut..(frame.args.pre and " " or "") end

return militaryDecorations