AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Give more memory to a plugin (https://forums.alliedmods.net/showthread.php?t=5309)

Ingram 08-27-2004 21:29

Give more memory to a plugin
 
i got error 3 on a plugin

3 - AMX_ERR_STACKERR This means that the plugin has run out of memory for local variables. By default each plugin gets 8K for local variables.

anyway to change this?

Freecode 08-27-2004 21:31

let us see ur code

jtp10181 08-27-2004 22:14

you prob are having infinite loop (recursion) issues and its creating tons of new variables and not cleaning up old ones cause the function is not quitting. Seen it b4 in superhero (bugs I made, heh).

There is a way to give the plugin more though, its in the small documentation and its form #pragma define thing.

Ingram 08-27-2004 23:00

well it was simplier actually. Just created 2 large arrays for simplicity. If i ran the function i got that error. I worked it down to one, i just thought thats a little annoying and whats the point of it?
Thx for the solution

BAILOPAN 08-27-2004 23:48

Code:
#pragma dynamic 32768
Creates 128KB of memory for your plugin, default size is 4096 cells (16KB).

Stack error can only be caused by overflowing the stack, which is caused by calling new on huge arrays or by using recursion.

Using a loop with creating variables should be okay since the stack is cleaned up.

Ingram 08-28-2004 00:02

any maximum to #pragma ?? (other than ur ram)


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

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