Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:SetUseLuaErrorHandling

From RoR Wiki

UI Lua API · Interface functions
Version: WAR 1.4.8

Stores the "use Lua error handling" setting.

SetUseLuaErrorHandling(enabled)

Arguments

enabled
boolean – The new value.

Returns

Nothing.

Details

  • The client stores the value and returns it from GetUseLuaErrorHandling. In this client no other code reads the stored flag, so the call has no effect of its own.
  • enabled must be a real boolean. Passing nil or 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 = GetUseLuaErrorHandling()
enabled = not enabled

SetUseLuaErrorHandling( enabled )
ButtonSetPressedFlag( "DebugWindowOptionsErrorOption2Button", enabled )

See also