Aliases

  • debug.isvalidlevel
  • validlevel
  • isvalidlevel

Arguments

number
required
The stack-frame level to inspect. See this function’s frame-numbering rules below.
thread
The coroutine whose environment, script association, or stack is inspected.

Returns

boolean
Whether the queried condition holds.
Tests level >= 0 and level < stacksize. Does not guarantee that a different debug API will accept that frame or that it is a Lua closure. Related types: Debug types & behavior.

Example