ব্যবহারকারী:Rahul amin roktim/lua
{{#invoke:ConvertTime|main|১৬:২৫, ৩ এপ্রিল ২০১৩ (ইউটিসি)}} 16:25, 3 April 2013 (ইউটিসি)
local p = {}
function p.hello( frame )
return "Hello, world!"
end
function p.roktim(frame)
return "hello roktim!"
end
function p.user(frame)
local s = frame.args[1]
return "hello " , s
end
return p-- how to use ? don't know ?
-- [[
{{#invoke:test2|hello}}
{{#invoke:test2|roktim}}
{{#invoke:test2|user|rahul amin}}
here #invoke: for call lua
test2 is 'page name'
hello is 'function name'
:)
---
when you call function you have to 'declare local p ={}' name space in wikipedia
### oky how to use args ?
in user function -- 'rahul amin' is frame.args[1]
note:// here index 1 is fast index NOT 0 :/
]]
to know more [১]