StendhalScripting/Lua: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>AntumDeluge |
imported>AntumDeluge |
||
| Line 24: | Line 24: | ||
== Variables == |
== Variables == |
||
By default, Lua variables are set in [https://en.wikipedia.org/wiki/Global_variable '''global''' scope] (meaning it is exposed to the entire Lua engine). To create a variable in [https://en.wikipedia.org/wiki/Local_variable '''local''' scope], the <code>local</code> keyword must be used: |
|||
<pre> |
<pre> |
||
-- a global variable |
-- a global variable |
||