sgs_FCall [functions]

int sgs_FCall( sgs_Context* C, int args, int expect, int gotthis )

Call the function with the arguments on stack, returning the expected number of variables on stack.

After a successful call, all arguments will be popped off the stack and the expected number of variables will appear in their place. If the underlying callable does not return enough values, 'null' variables will be pushed instead. If the number of returned values is bigger than expected, only the first expected return values will stay on the stack.

To check if function call was aborted, see sgs_Cntl / SGS_CNTL_GET_ABORT.

To find out if execution state was suspended in this call, see sgs_Cntl / SGS_CNTL_GET_PAUSED.