So it would appear that Angelscript is being rather inconsistent with what functions it will allow me to handle. I'm trying to declare a global function thusly:
scrpEngine->RegisterGlobalFunction("float sin(float in)", asFUNCTION(sinCallback), asCALL_CDECL);
My sin callback function (which is to call the sin function without worrying about it being overloaded) looks something like this:
float sinCallback(float in) {
return sin(in);
}
Whenever I compile the script, I get errors, specifically these:
ERROR: System function (1:17) : Expected ')' or ','
ERROR: (0:0) : Failed in call to function 'RegisterGlobalFunction' with 'float sin(float in)' (Code: -10)
Checking the documentation and header files, this error code pertains to invalid syntax..however the syntax of the function declaration definitely SHOULD be valid. Anyone have any ideas?