lua-users home
lua-l archive

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


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

After realizing luaL_ref pops the value at the top of the stack off, I have modified the code:

    luaL_checktype(L, -2,  LUA_TNUMBER);
    luaL_checktype(L, -1, LUA_TFUNCTION);

    ref1 = luaL_ref(L, LUA_REGISTRYINDEX); // pops value off

    duration = lua_tonumber(L, -1);


However this still does not fix anything unfortunately.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFAwBWi0noMGorKkKgRAqcRAKCyPwX2/plOhhFpMnLBcS36IXYDEwCdEk/W
AN2fp2btYM0Eopj6h5VAQUU=
=DxVw
-----END PGP SIGNATURE-----