API:SetLoadLuaDebugLibrary
From RoR Wiki
UI Lua API · Interface functions
Version: WAR 1.4.8
Stores the "load Lua debug library" setting.
SetLoadLuaDebugLibrary(enabled)
Arguments
- enabled
boolean– The new value.
Returns
Nothing.
Details
- The client stores the value and returns it from GetLoadLuaDebugLibrary. In this client no other code reads the stored flag, so the call has no effect of its own.
- The stock UI reads the flag back with GetLoadLuaDebugLibrary when
ea_uidebugtools/source/debug.lualoads, to decide whetherassertis active. A change therefore only matters to that script after the interface is reloaded. enabledmust be a real boolean. Passingnilor a number raises an Invalid Parameters error.- The function takes exactly one argument.
Errors
None besides the Invalid Parameters argument check.
Example
The debug window's toggle, from ea_uidebugtools/source/debugwindow.lua:
local enabled = GetLoadLuaDebugLibrary() enabled = not enabled SetLoadLuaDebugLibrary( enabled ) ButtonSetPressedFlag( "DebugWindowOptionsLuaDebugLibraryButton", enabled )
