Two-dimensional array limit in function?
#1

So, i am running into a weird problem. I am creating a two-dimensional array in a function like this:

Код:
forward TestFunc(test1);
public TestFunc(test1)
{
    print("0");
    new testfloat[1000][2];

    print("1");
}
When i call the function via:
Код:
    print("Calling TestFunc");
    TestFunc(count)
    print("TestFunc called");
My function crashed and i see the following in my log:
Код:
[14:04:44] Calling TestFunc
[14:04:44] 0
However, when i decrease the two-dimensional array size to [500][2] it does work, like this:

Код:
forward TestFunc(test1);
public TestFunc(test1)
{
    print("0");
    new testfloat[500][2];

    print("1");
}
Result:
Код:
[14:05:18] Calling TestFunc
[14:05:18] 0
[14:05:18] 1
[14:05:18] TestFunc called
Can anyone tell me what is going wrong here? Creating a two-dimensional array like this as a global variable or in a DCMD funcion etc does work..
Reply


Messages In This Thread
Two-dimensional array limit in function? - by jop9888 - 15.07.2018, 12:13
Re: Two-dimensional array limit in function? - by NaS - 15.07.2018, 12:40
Re: Two-dimensional array limit in function? - by jop9888 - 15.07.2018, 12:50
Re: Two-dimensional array limit in function? - by jlalt - 15.07.2018, 12:51
Re: Two-dimensional array limit in function? - by jop9888 - 15.07.2018, 13:35
Re: Two-dimensional array limit in function? - by Pottus - 15.07.2018, 14:04
Re: Two-dimensional array limit in function? - by jlalt - 15.07.2018, 14:52
Re: Two-dimensional array limit in function? - by jop9888 - 15.07.2018, 17:36

Forum Jump:


Users browsing this thread: 1 Guest(s)