Problem with AMX file
#1

Hi, I have a problem, i got a 300 line script and when I compile it it gives me a 4,1mb amx file even though the .PWN file is 8kb, please help me..
Reply
#2

What an unusual issue.

Maybe you've used "#pragma dynamic" in your code ?
Or too big arrays ?

The .pwn file's size is just the number of letters in the mode, while the amx file's size is the size of the include files + the size of all the variables + the numbers of letters (+ eventually a #pragma dynamic).
Reply
#3

I didn't use #pragma dynamic, i don't even know what is that...I'm using a foreach, sscanf2, Y_ini and ZCMD include..
Reply
#4

And what about the size of your arrays ?

Creating something like this

pawn Код:
new text[1024], query[2048], name[128];

format(text, sizeof(text), "Hello world, my player ID is %d !", playerid);
SendClientMessageToAll(-1, text);

mysql_format(query, sizeof(query), "INSERT INTO `Players` (`email`, `password`) VALUES ('%e', MD5('%s'))", "my_email'adress@mail.us", "samp forums");
mysql_tquery(gHandle, query);

GetPlayerName(playerid, name, sizeof(name));
Is completely useless and will give you a performance problem since you use so much unused variables.
Reply
#5

I found the problem, it is
pawn Код:
public OnPlayerConnect(playerid)
{
    new userfile[40];
    format(userfile, sizeof(userfile), USER_FILE, GetName(playerid));
    if(fexist(userfile))
    {
        INI_ParseFile(userfile, "%s", .bExtra = true, .extra = playerid);
    }
    return 1;
}
How can I solve that? I really need to load the player's name file when the player connects.
Reply
#6

Somebody?
Reply
#7

Sorry, I don't know how to use y_ini.

You should maybe ask ****** about this issue.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)