Engine:CLUA script: Difference between revisions

Line 20: Line 20:
Creates a Lua function that sets and prints a variable and runs it from script, all from inside Lua.
Creates a Lua function that sets and prints a variable and runs it from script, all from inside Lua.
<lua>
<lua>
function alan(s) script 'bob ' + s + ';bob' end
function fred(s) script 'bob ' + s + ';bob' end
script "lua alan('fred')"
script "lua fred('james')"
</lua>
</lua>
: Prints 'fred'
: Prints 'james'


== Notes ==
== Notes ==
*
*