It may be possible to hack around that. Try with this:
PHP Code:
native int GetNativeArray2D(int param, any[][] local, int sizecells) = GetNativeArray;
public int Native_PassMy2DArray(Handle plugin, int numParams)
{
int my2DArray[3][6];
GetNativeArray2D(1, view_as<any>(my2DArray), 3 + 3 * 6);
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 6; j++) {
PrintToServer("my2DArray[%d][%d] = %d", i, j, my2DArray[i][j]);
}
}
}
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max)
{
CreateNative("PassMy2DArray", Native_PassMy2DArray);
return APLRes_Success;
}
And in your sub-plugin:
PHP Code:
native void PassMy2DArray(int[][] arr);
public void OnPluginStart()
{
int myArray[3][6] = {
{1, 2, 3, 4, 5, 6},
{7, 8, 9, 10, 11, 12},
{13, 14, 15, 16, 17, 18}
};
PassMy2DArray(myArray);
}
I'm really interested if that would work, because I have just tested a similar hack on AMXX and it worked.
(please don't kill me for proposing this)