Skip to main content
Replaces one constant in a Lua function or stack level by one-based index. Invalid stack levels raise “Level out of range”, non-Lua functions raise “Lua function expected”, indexes below 1 raise “Constant index starts at 1”, and indexes past the available constants raise “Constant index out of range”. debug.setconstant is an alias.

Cú pháp

Alias

  • debug.setconstant

Đối số

Ví dụ

Replace one Proto constant in a Lua closure or stack level.