int ok = luaL_getconstant(lua_State *L, const char *name, lua_Number *nval, char **sval);
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.
lua_State
True
for success, False
on failure