Dear all,
I have problems to pass script arrays to registered functions. I searched for examples without success.
In the script I have:
int[] Arr = { 123, 456, 789 };
void main(void)
{
PassArray(Arr);
}
Then I registered a function:
engine->RegisterGlobalFunction("void PassArray(const array<uint32> &in Arr)",
asFUNCTION(PassArray), asCALL_CDECL);
But compiling the script I have the error:
No matching signatures to 'PassArray(int[])'
I also tryed all possible variations adding and removing & and @ in both registration and script, without finding any correct way.
I coudn't check the real execution of this function but I thought I could declare it in C++ code as:
void PassArray(CScriptArray &Arr);
Any Idea on how to pass arrays to native functions?
Thanks.
Mau.