AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Maximum Array Limit? (https://forums.alliedmods.net/showthread.php?t=40609)

schnitzelmaker 06-30-2006 08:25

Maximum Array Limit?
 
It is possible to make arrays bigger then array[2048] ?

Hawk552 06-30-2006 12:14

Re: Maximum Array Limit?
 
What? This compiles for me with no problems:

Code:
new Array[65535]

schnitzelmaker 06-30-2006 13:17

Re: Maximum Array Limit?
 
compile yes,but if i run hl with,"new Array[65535]" ,it give me an error:

L 06/30/2006 - 19:27:12: [AMXX] Run time error 3: stack error

Hawk552 06-30-2006 13:18

Re: Maximum Array Limit?
 
Quote:

Originally Posted by schnitzelmaker
compile yes,but if i run hl with,"new Array[65535]" ,it give me an error

I've never had that happen to me before, but if you really have to you can try the Array module, which I'm sure has support for things like this. You can find it in the modules board.

BAILOPAN 06-30-2006 19:28

Re: Maximum Array Limit?
 
Try to stay away from arrays this big. If the array is global or static, it's fine. If you're doing this inside a function, and it's not static, you're going to run into performance problems, and plugin stack issues.

You can increase the amount of stackspace allocated to local function using this:
Code:
//Increase memory to 512K cells (~2MB of memory) #pragma dynamic 524288


All times are GMT -4. The time now is 08:08.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.