StendhalScripting/Lua: Difference between revisions

Content deleted Content added
imported>AntumDeluge
imported>AntumDeluge
Line 24:
== Variables ==
 
BeBy 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>
-- a global variable