Hi, I'm defining the following function inside a script:
void TestFunction(const MyType &in testType)
{
// ...
}
and 'MyType' is an object type that I registered in application with flag asOBJ_REF and I have only registered AddRef and Release behaviours.
I've also registered the following function on engine: "void TestRetrieve(const MyType &in)".
The problem here is, "TestRetrieve" is successfully registered, I got no errors or problems using this function, reference will be retrieved and the object is working.
But when I try to define a function inside the script, the error in the title will happen!
However, I commented https://www.sourceforge.net/p/angelscript/code/HEAD/tree/trunk/sdk/angelscript/source/as_compiler.cpp#l377 - 389 and the code is working fine, why it needs instantiation at all? The object is instantiated in the application, in fact, I don't want it to be instantiated by the script, I want it to be passed into script by inref.