HolyLib Wiki

holylua

holylua

HolyLib can create a second, fully independent Lua interface (its own Lua state) that runs alongside the gamemode's normal Lua state.
It is started automatically whenever the holylib_lua ConVar is enabled, and automatically loads every script found inside lua/autorun/_holylua/ when it starts up.
This library lets your normal gamemode code send code over to run inside that separate interface.

Since it's a separate Lua state, it does not share any globals, tables or hooks with your gamemode. Communication between the two has to happen thru functions like holylua.RunString.

Methods

boolean holylua.RunString( string code )
Runs the given code inside HolyLib's separate holylua interface.
Does nothing if called from inside the HolyLua interface itself.