[quote name='dmail' timestamp='1300480382' post='4787674']
[color="#CCCCCC"]Have you read the link to the manual I posted yet?
Yes, several times before you posted it. Now, could you explain how that link answers the question I made?
No wait, that would be actually helpful...
[/quote]
lua_pcall needs a function and there is not one on the stack which is why you get the error about trying to call nil. The reason is because luaL_ref returns a reference and also pops the value of the stack. If you wanted to kept a copy like that, you could call lua_pushvalue to duplicate the entry on the stack or pull using luaL_ref then push back using lua_rawgeti.
Eventually you may not even want to store the table to which the function belongs and just store the function itself, I am not sure if this was the intention when pushing them before the pcall as you do not signal any parmeters to the function.