Problem with AMX file -
friezakinght - 08.07.2014
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..
Re : Problem with AMX file -
S4t3K - 08.07.2014
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).
Re: Problem with AMX file -
friezakinght - 08.07.2014
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..
Re : Problem with AMX file -
S4t3K - 08.07.2014
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.
Re: Problem with AMX file -
friezakinght - 08.07.2014
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.
Re: Problem with AMX file -
friezakinght - 08.07.2014
Somebody?
Re : Problem with AMX file -
S4t3K - 08.07.2014
Sorry, I don't know how to use y_ini.
You should maybe ask ****** about this issue.