SA-MP Forums Archive
What does all these words mean when I compile? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What does all these words mean when I compile? (/showthread.php?tid=122969)



What does all these words mean when I compile? - Celson - 24.01.2010

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Header size: 5172 bytes
Code size: 160380 bytes
Data size: 144292 bytes
Stack/heap size: 16384 bytes; estimated max. usage=4534 cells (18136 bytes)
Total requirements: 326228 bytes


Hmm, what's it all about?


Re: What does all these words mean when I compile? - Blacklite - 24.01.2010

This absolutely DOES MATTER.

Running your server in this state is unstable. You either need to decrease your memory usage by using less arrays and re-using them, or use "#pragma dynamic" to increase the allocated memory for your script.

Whatever you do, do not ignore it, as it's definitely NOT a compile success message.


Re: What does all these words mean when I compile? - Babul - 24.01.2010

that line...
Stack/heap size: 16384 bytes; estimated max. usage=4534 cells (18136 bytes)
...let me suspect your gamemode consists of some arrays stored and processed in a too large heap-buffer.

the code uses 160k, and its data another 144k, thats ok imo, much players needs much data stored ^^

i would think about browsing through the entire script, and fix all name/textdraw/chat stringsizes (1-dimensional arrays), like those...
Код:
new string[256];
//blablabla
.. and lower them to the proper size, f.ex [128] for chatmessages,
count the textdraw's textsizes (incl the "~n~~b~~h~(%d) %s" etc) to fit (almost) exactly.
strings are using ascii code, which uses 1 byte only per character. that wont lower the buffer usage that much i guess.

i believe those 4-bytes consuming values are the key - this line...
Код:
static WeaponToSell[MAX_PLAYERS][20][2];
... which is a 3dimensional array, that can grow up pretty fast, if u raise 1 value.
18136/4534=4 bytes. so watch out especially out for integer values stored inside (like my WeaponToSell[][][] does),
like Money, Prices, Amounts of anything that can be "displayed" by a numeric value...





Re: What does all these words mean when I compile? - RyDeR` - 24.01.2010

Add this at the top of your mode:

#pragma dynamic 100000


Re: What does all these words mean when I compile? - SlashPT - 12.03.2010

ive the same problem but mine is more how much should i put and how to calculate ??

Код:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:     12100 bytes
Code size:     1549520 bytes
Data size:     5472880 bytes
Stack/heap size:   16384 bytes; estimated max. usage=4435 cells (17740 bytes)
Total requirements: 7050884 bytes



Re: What does all these words mean when I compile? - aircombat - 12.03.2010

first of all . that's not a problem that's normal compile , the only problem its showing that because u r using a very big string like : new string[1200];


Re: What does all these words mean when I compile? - SlashPT - 12.03.2010

yeah but anyway is bad i know what is bad on my script im correcting strings but anyway i would like know how to calculate the Dynamic