I know this seems a bit silly but I made a helper class to load scripts and stuff.
I have been able to use the GetParamTypeId from asIScriptFunction to determine the type of parameters and what SetArg function to use. Though I do not know how you can detect if your using a reference like "int &out val" so that I can use SetArgAddress instead.
Any help is appreciated.