Debug

isvalidlevel

Checks whether a stack level can be inspected safely.

Syntax

isvalidlevel(level: integer): boolean
Aliases validleveldebug.isvalidleveldebug.validlevel

Arguments

NameTypeDescription
levelintegerOne-based stack level to inspect or update.

Returns

NameTypeDescription
validbooleanTrue when the JSON string is valid.

Description

Checks whether a stack level can be inspected safely.

Call it with 1 parameter(s): level. The argument table explains which values are required and which ones only refine the behavior.

It returns valid (boolean). Use the returns table to separate successful values from nil results and recoverable errors.

Example

Example call with placeholder values.

local result = isvalidlevel(1)
print(result)