ব্যবহারকারী:Rahul amin roktim/lua: সংশোধিত সংস্করণের মধ্যে পার্থক্য
বিষয়বস্তু বিয়োগ হয়েছে বিষয়বস্তু যোগ হয়েছে
সম্পাদনা সারাংশ নেই |
সম্পাদনা সারাংশ নেই |
||
৪ নং লাইন:
{{#invoke:ConvertTime|main|১৬:২৫, ৩ এপ্রিল ২০১৩ (ইউটিসি)}}
<syntaxhighlight lang="lua">
local p = {}
১৪ ⟶ ১৫ নং লাইন:
return "hello roktim!"
end
function p.user(frame)
local s = frame.args[1]
return "hello " , s
-- how to use ? don't know ?▼
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 :/
]]
|