AcediaDocumentation

debug.getupvalue

Reads one captured value by its index.

Upvalue indices start at 1. The returned value is the live captured value.

debug.getupvalue(subject: function | number, index: number): any

Parameters

ParameterTypeDescription
subjectfunction | numberLua function or reachable stack level. C functions are rejected by prototype readers.
indexnumberOne-based constant or upvalue index.

Errors: An out-of-range index raises an error.

Aliases: getupvalue.

On this page