SA-MP Forums Archive
Gamemode Compiling Size - 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: Gamemode Compiling Size (/showthread.php?tid=472669)



Gamemode Compiling Size - rappy93 - 30.10.2013

Hey guys... I get a wierd thing after I'm done compiling my gamemode. Its not what you think, there are no erros or warnings. It seems something is way too huge and it displays in this manner.

Note : Also, my gamemode's .amx is 40mb in size. My gamemode has around 40.000 lines so it shouldn't be that much.

Quote:

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Header size: 21852 bytes
Code size: 1944684 bytes
Data size: 167236404 bytes
Stack/heap size: 120000 bytes; estimated max. usage: unknown, due to recursion
Total requirements:169322940 bytes

Done.

Later edit : This is a list of my includes. If you have any ideas about which one might cause this please let me know
pawn Код:
#include <a_samp>
#include <a_mysql>
#include <strlib>
#include <utils>
#include <a_http>
#include <dini>
#include <multilines>
#include <audio>
#include <F_Streamer>
#include <zones>
#include <progress>
#include <neon>
#include <zcmd>
#include <regex>
#include <opjv>
#include <foreach>



Re: Gamemode Compiling Size - DanishHaq - 30.10.2013

40mb amx file? That'd be normal for the 1-2million line scripts, which don't even exist!

Make sure your indention is fine, and make sure you're not using any unnecessary include files. Also, make sure that your arrays for the strings you're making are suitable, don't have massive arrays basically.


Re: Gamemode Compiling Size - rappy93 - 30.10.2013

Been checking some strings lately...dont think there is the problem.

What does "indention" mean ? I dont think I got it.


Re: Gamemode Compiling Size - DobbysGamertag - 30.10.2013

Quote:
Originally Posted by rappy93
Посмотреть сообщение
Been checking some strings lately...dont think there is the problem.

What does "indention" mean ? I dont think I got it.
pawn Код:
SomeFunction()
{
    This
    {
        Is
        {
            Indention
        }
    }
}
SomeOtherFunction
{
This
{
Is
{
Not
}
}
}



Re: Gamemode Compiling Size - rappy93 - 30.10.2013

Well, I script like this
pawn Код:
{

    {

        {
 

         }

     }

}
Now,what should I be looking for exactly?


Re: Gamemode Compiling Size - rappy93 - 30.10.2013

Later edit : This is a list of my includes. If you have any ideas about which one might cause this please let me know
pawn Код:
#include <a_samp>
#include <a_mysql>
#include <strlib>
#include <utils>
#include <a_http>
#include <dini>
#include <multilines>
#include <audio>
#include <F_Streamer>
#include <zones>
#include <progress>
#include <neon>
#include <zcmd>
#include <regex>
#include <opjv>
#include <foreach>



Re: Gamemode Compiling Size - Pottus - 30.10.2013

You probably have some really large arrays and you are compiling with 500 players check for those


Re: Gamemode Compiling Size - rappy93 - 30.10.2013

I just went through the whole script and cut almost all the strings into half their size where it could be done.
Also, MAX_PLAYERS is defined to 108 since my server slots are 100. Still same error.


Re: Gamemode Compiling Size - DobbysGamertag - 30.10.2013

Not too sure if it would work or not but;

pawn Код:
#pragma dynamic 20000



Re: Gamemode Compiling Size - rappy93 - 30.10.2013

Tried pragma dynamic before but here, this is the result with your value :

stack/heap size: 80000 bytes; estimated max. usage: unknown, due to recursion

My question is , does it affect my script if I let it this way ?