lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>In my MUD engine, when a script file is loaded, I would like to "pre-parse"
>it to byte code, before the engine it self ever attempts to run it.

With Lua 4.1, use lua_loadfile instead of lua_dofile.
With Lua 4.0, write your scripts as "return function () XXX end", where XXX
is your original script, run dofile on this and get return value.

If you want to save pre-compiled scripts, use dump in 4.1 (see src/luac/dumplib).
--lhf