The reason for your error is that unreal engine 4 does not support the int type. The type you are looking for is int32.
For further information take a look at this question:
The next thing is that you should not use pointers to pass the array but use the engines TArray type instead:
And unreal engine has support for pointers as given here:
But a better way than using this smart pointers would be to use the engines implementation of smart pointers as documented here: