I have a function registered as:
engine->RegisterGlobalFunction("void MyFunction(const ?&in)", ..., asCALL_GENERIC);
I would like to call that function from within my application. I would be happy to either call it with a context:
or to call it directly by creating an asIScriptGenric-compatible object.
Calling the function with a context seems to work, but I cannot figure out how to establish the argument's type.
I am calling:
but then the call to asIScriptGeneric::GetArgTypeId(0, ...) returns asTYPEID_VOID.
It looks like there is a secret "typeid" argument at the next stack position, but the following calls do not work:
context->SetArgAddress(0, &myArg); context->SetArgDWord(1, myTypeId);
because the function only takes one argument.
Should there be a "SetArgTypeId" function, a "SetArgQuestion" function, or am I missing something?