SA-MP Forums Archive
How to fix my compiler - 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)
+--- Thread: How to fix my compiler (/showthread.php?tid=606168)



How to fix my compiler - Saliim - 30.04.2016

Hi how to fix that :

Код:
Header size:           8944 bytes
Code size:           512340 bytes
Data size:         18674000 bytes
Stack/heap size:      16384 bytes; estimated max. usage=4410 cells (17640 bytes)
Total requirements:19211668 bytes
i have a bug with my pickup :/


Re: How to fix my compiler - OmegaKiller72 - 30.04.2016

what kaind of bug? its normal work of compiller


Re: How to fix my compiler - Saliim - 30.04.2016

I do not understand what you said,
compile it shows me that
Код:
Header size:           8944 bytes
Code size:           512340 bytes
Data size:         18674000 bytes
Stack/heap size:      16384 bytes; estimated max. usage=4410 cells (17640 bytes)
Total requirements:19211668 bytes
I read that it was a problem of "string",
so I change limit of a_samp , but it does not work


Re: How to fix my compiler - MBilal - 30.04.2016

This is not bugged.

Already told u how to Fix pickup in your other post kindly check that out.
there is nothing wrong with Compiler.


Re: How to fix my compiler - DRIFT_HUNTER - 30.04.2016

That is just fine...
Its just warns you that your stack is a bit to big (Usually it means not rational memory usage). But If your gamemode is big than its just normal...


Re: How to fix my compiler - Saliim - 30.04.2016

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
That is just fine...
Its just warns you that your stack is a bit to big (Usually it means not rational memory usage). But If your gamemode is big than its just normal...
how to make rational

Quote:
Originally Posted by MBilal
This is not bugged.

Already told u how to Fix pickup in your other post kindly check that out.
there is nothing wrong with Compiler.
I do not remember post a topic about the pickups


Re: How to fix my compiler - OmegaKiller72 - 30.04.2016

rational? build mod in includes


Re: How to fix my compiler - DRIFT_HUNTER - 30.04.2016

Lets say you want to save player name for each player to a variable. So you create variable:
pawn Код:
new PlayerName[MAX_PLAYERS][128];
Now player name can only be 24 characters long and you used 128. So anything beyond 24 is a waste as it will never be used.

In a memory usage perspective, lets count difference between 24 and 128.
Pawn uses cells for every variable (Float,Int,Char, anything). And if im not mistaking cell in pawn is 32bit or 4 Bytes.

So MAX_PLAYERS (1000) * 128 Cells = 128 000 Cells * 4 Bytes = 512000Bytes or ~500KB
But if you use 24 cells for username. Than 1000*24 = 24000*4=96000B = ~90KB

Now 500KB and 90KB...So 128 and 24 cells for each player, that is a big difference, much bigger than it seems on first sight.


Re: How to fix my compiler - Saliim - 30.04.2016

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
Lets say you want to save player name for each player to a variable. So you create variable:
pawn Код:
new PlayerName[MAX_PLAYERS][128];
Now player name can only be 24 characters long and you used 128. So anything beyond 24 is a waste as it will never be used.

In a memory usage perspective, lets count difference between 24 and 128.
Pawn uses cells for every variable (Float,Int,Char, anything). And if im not mistaking cell in pawn is 32bit or 4 Bytes.

So MAX_PLAYERS (1000) * 128 Cells = 128 000 Cells * 4 Bytes = 512000Bytes or ~500KB
But if you use 24 cells for username. Than 1000*24 = 24000*4=96000B = ~90KB

Now 500KB and 90KB...So 128 and 24 cells for each player, that is a big difference, much bigger than it seems on first sight.
i understand, thank you