Jump to content

Module:User:Doc Taxon/Hello: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Created page with 'local p = {} function p.hello(frame) local name = frame.args[1] if not name then name = 'World' end i = 1 u = {} repeat u...'
 
fix script error
Line 6: Line 6:
end
end
i = 1
i = 1
u = {}
u = ""
repeat
repeat
u = u .. 'Hello' .. name .. '! This is Lua!'
u = u .. 'Hello' .. name .. '! This is Lua!'

Revision as of 15:56, 12 October 2015

local p = {} 
function p.hello(frame)
    local name = frame.args[1]
    if not name then 
        name = 'World' 
    end
    i = 1
    u = ""
    repeat
    	u = u .. 'Hello' .. name .. '! This is Lua!' 
    	i = i + 1
    until i > 5
    return u
end 
return p