Hi. I've started a project and need to access an array from a different plugin to display a menu with options from that array. The only way I can think of is using callfunc to return that array.
I have plugin A with a function that returns the array.
Code:
public function() {
return someArray
}
I have plugin B that uses callfunc to call the function in plugin A and now I need to copy/save/access the array returned in callfunc_end(). With integers is easy, I just set new variable = callfunc_end() but since it is returning an array this method doesn't work. I tried with copy(dest[], sizeof(dest), callfunc_end()) but I get an "Argument type mismatch" error on the callfunc_end() argument, where it expects an array.
Code:
new array[25]
callfunc_begin("function", "pluginA.amxx")
copy(array, sizeof(array), callfunc_end()) //Doesn't work
Afaik there are no pointers in pawn and the array returned isn't a copy but a reference/handle. How do you access the referenced array in callfunc_end()? And if there is a better way to access the array, please let me know.
Thanks in advance.