Skip to main content

Aliases

  • debug.getconstant

Arguments

function | number
required
Lua function or stack level whose constants are inspected.
number
required
One-based constant index.

Returns

any | nil
Constant value at the requested index, or nil when that constant is a function or table.

Example

Read a one-based Proto constant from a Lua closure.