Skip to main content

别名

  • debug.getconstant

参数

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

返回值

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

示例

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