The integrated LUA script engine also provides the opportunity to split the LUA implementation into separate source files. Using this way, it is possible to implement user-defined LUA functions that can be reused in other NETx BMS Core Server projects. In addition it keeps the LUA source code short, clearly arranged, and easy to maintain.
User-defined LUA script files have to be stored within the script directory of the workspace directory. To reuse a LUA script file, it has to be imported within the standard LUA file "nxaDefinitions.lua" by using the key work "require".
Example: require "MyLuaScriptFile"
This code line includes the file "MyLuaScriptFile.lua" into the default LUA script file – thus all functions that are defined there are available within the whole script engine. Note that is has to be ensured that a function name is used only once.
In order to load a previously encrypted LUA script us the nxa.LoadXLuaLibrary function:
General
Content
Integrations