PDA

View Full Version : Quick Lua question


diordna
2006.09.05, 11:30 AM
I'm using Lua in one of my projects to do various things, but one of my problems is that whenever I run a script for the first time, it has to compile it and pauses the game for a second. Is there a way I can compile them all beforehand?

Unless I'm doing something wrong, which is far more likely...

AnotherJake
2006.09.05, 02:44 PM
Lua comes with a command line compiler called luac. Simply do luac <filename> and it'll spit out a compiled script for ya. By default, the output file will be luac.out. You could name it on output as in: luac -o myCompiledScript.out myScript.lua