Stack/heap
#1

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Header size: 6664 bytes
Code size: 702036 bytes
Data size: 424524 bytes
Stack/heap size: 16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 1149608 bytes


is this problem for game mode ?
how to fix it ?
Reply
#2

You are using too many [256]s or above. Try lowering to [128] or go even lower than that.
Reply
#3

Quote:
Originally Posted by [L3th4l]
Посмотреть сообщение
You are using too many [256]s or above. Try lowering to [128] or go even lower than that.
That wouldn't be a good solution in general. It would avoid the stack size warning perhaps, but wouldn't mean that the script is any good on efficiency. Look up ******' thread on Code optimization and try to follow what he's saying. Also use faster functions/plugins (such as sscanf 2.0 plugin instead of the old inefficient split)
Reply
#4

https://sampforum.blast.hk/showthread.php?tid=55261
Reply
#5

is this error problem for game mode ?
i cant fix it
Reply
#6

Yes, it's your gamemode problem, it may or may not cause problems for you. It's best to get it fixed, however we can't fix it either without seeing your full source.
Reply
#7

http://files.ubercrue.com/nbworldcup.zip this game mode
Reply
#8

Quote:
Originally Posted by [TR]Oguzhan
Посмотреть сообщение
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
I also have the same type of compile result, but I never have expiered any tpye of errors etc, in my GM.
Reply
#9

Simple enough, you're using too many *** ****** variables and useless oversized strings, like a variable to save a player name for each player, in a size of 128 while the max size is 24 (or 16?)

Switch to PVars, stop using useless strings but just get the data from the player when you call it.
Reply
#10

The easiest way to fix it is to increase the stack size using #pragma dynamic, e.g.
pawn Код:
#pragma dynamic 12345 // or any other size large enough to get rid of warning message
// default value is 4096 IIRC
Also you can try using less memory for local variables, i.e. those which are declared inside functions (mainly strings and other arrays), by making them as small as possible. Everyone here would tell you follow this way as it's "right" to not occupy resources you won't even use. You can follow the optimization guide by ******, see links above. In most situations it helps. But if you really _need_ a lot of space for your locals, or you just have no time to optimize the whole script, or you're too lazy, follow the first approach - it always works (here I assume your computer/server have enough memory to hold a few kilobytes more).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)