lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> When I call lua_getresult(1), I get the same result no matter
> what I feed the the function.

lua_getresult returns a lua_Object.  A lua_Object can be one of several data
types, so you have to use one of the lua_getXXX functions to convert the
lua_Object into the actual data.  In your example, that means:

lua_getnumber(lua_getresult(1))

See section 5.2 in the docs for more info.