« Introduction au Lua/Modules » : différence entre les versions

Contenu supprimé Contenu ajouté
Creating.
 
Ligne 34 :
</pre></blockquote>
 
== Understand Your Lua Script ==
== Conclusion ==
To understand your Lua script:
# Notice that the function name for the first function is ''hello'':
#:<code>p.hello()</code>
# Notice that the function name for the second function is ''meet'':
#: <code>p.meet()</code>
# Notice that the first <nowiki>#invoke</nowiki> calls the ''hello'' function:
#: <code><nowiki>{{#invoke:Sandbox|hello}}</nowiki></code>
# Notice that the second <nowiki>#invoke</nowiki> calls the ''meet'' function:
#: <code><nowiki>{{#invoke:Sandbox|meet}}</nowiki><code>
Each Lua module can contain one or more functions that may be called individually.
 
== Conclusion ==
Congratulations! You've now written, tested, and understood a Lua module with multiple functions. Continue on to the next lesson.
 
== References ==