Raised This Month: $ Target: $400
 0% 

Maximum Array Limit?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
schnitzelmaker
Senior Member
Join Date: Apr 2006
Location: HERE
Old 06-30-2006 , 08:25   Maximum Array Limit?
Reply With Quote #1

It is possible to make arrays bigger then array[2048] ?
__________________
schnitzelmaker is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-30-2006 , 12:14   Re: Maximum Array Limit?
Reply With Quote #2

What? This compiles for me with no problems:

Code:
new Array[65535]
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
schnitzelmaker
Senior Member
Join Date: Apr 2006
Location: HERE
Old 06-30-2006 , 13:17   Re: Maximum Array Limit?
Reply With Quote #3

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
__________________

Last edited by schnitzelmaker; 06-30-2006 at 13:19.
schnitzelmaker is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-30-2006 , 13:18   Re: Maximum Array Limit?
Reply With Quote #4

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.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
BAILOPAN
Join Date: Jan 2004
Old 06-30-2006 , 19:28   Re: Maximum Array Limit?
Reply With Quote #5

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
__________________
egg
BAILOPAN is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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