Home Contents | # debug.getupvalue | Debug | Lua Commands

## SYNOPSIS

debug.getupvalue(func,up)

## DESCRIPTION

This function returns the name and the value of the upvalue with index up of the function func. The function returns nil if there is no upvalue with the given index.

## RETURN VALUE

This function returns the name and the value of the upvalue with index up of the function func.

## ERRORS

The function returns nil if there is no upvalue with the given index.