Have you tried debugging the values you are using to see what size array you are creating? I’m not sure if your code is exactly the way it is above but try “int32” instead of “int 32”.
If you want to dynamically set the size of your array you will have to do it with “new”, for example:
int **Array_2d = new int*[size_x];
for(int i = 0; i < size_x; ++i;)
Array_2d[i] = new int[size_y];
With this you will have to also delete every row and after that the array itself with “delete []”(make sure to do this properly!). Now, while this works, it’s probably not the best solutition. Something that is less prone to errors and also faster is using std::vector to create a 2 dimensional array(as I don’t think that Unreal supports 2d arrays with TArray).
In case any questions arise there, I would suggest you to also look a little bit further into how pointers/(dynamic) arrays/vectors work in c++, in order to make sure everything ends up correctly.
Check if one of your round to int is not rounding to 0, while it is perfectly legal to declare array of 0 lenght it might happen that it won’t allocate any memory as by this stackoverflow answer. Might be your problem.