Execute a given function and put its results on the stack, where it is retrievable with aot_top_get_val.
The optional arguments ErrCode and ErrString provide some feedback on the success of the function execution. If none of them are in the argument list, the execution of the application will be stopped, and the error will be printed to the standard output. You have to provide the number of results to obtain in nresults. Keep in mind, that multiple results have to obtained in reverse order from the stack.
You might want to return multiple values as a single argument in a table instead of several single values.
Handle for the Lua script.
Handle to the function to execute.
Number of resulting values the caller wants to obtain from the Lua function.
Error code returned by Lua during execution of the function.
Obtained error string from the Lua stack if an error occured.