Name
luaL_getconstant -- get constant value (V9.0)
Synopsis
int ok = luaL_getconstant(lua_State *L, const char *name,
             lua_Number *nval, char **sval);
Function
This is not an official Lua API but a Hollywood extension. luaL_getconstant() returns the value of the constant specified by name. Note that the string passed in name must not contain the #-prefix typically used by Hollywood constants. It must only contain the constant's actual name.

If the constant is a numeric one, luaL_getconstant() will write its value to the nval pointer. If it is a string constant, its value will be written to sval instead.

Designer compatibility
Unsupported

Inputs
L
pointer to the lua_State
name
name of the constant to get
nval
storage for the value of numeric constants
sval
storage for the value of string constants
Results
ok
True for success, False on failure

Show TOC