[QUESTION] About Compiler in 0.3
#1

My script acquired more than 3,5MB extra in your size when compiled in this new version... Why?

Because of the increase of the limits and consequently of ARRAYS?
Example: Jailed[MAX_PLAYERS]

But I'm using custom arrays as MY_MAX_PLAYERS defined for only 50 players instead of 500, in the gamemode and in the includes
And other scripts were recompiled without acquiring an extra size...

Why I worry about that?
Because in 0.2x I had problems with random crashs that were only resolved when I got to reduce the size of the amx, using custom defines for MAX_PLAYERS, MAX_VEHICLES... and replacing arrays with [256] for [128] when appropriate.

The size of my amx now is 5,8MB, before it was 2,3MB, will I have problems with that?

Thanks
Sorry my bad english...






Reply
#2

Don't think you're amx file size can cause crashes (not to sure).

So the only problem I can think of is when uploading your script to a remote server...

Grts Riz
Reply
#3

This got answered before, it doesnt really effect anything i think.
Reply
#4

I had the same problem here, unfortunately I couldn't find anything which fixed the size difference.
You shouldn't have any problems, besides possibly extra time it takes to compile, however there shouldn't be any server problems.
Reply
#5

Check your includes.

Many streamers (and other includes) use MAX_PLAYERS for their arrays.
Reply
#6

Unfortunately, it seems like large amx files can cause crashes.

pawn Код:
#include <a_samp>

new Data[500000];

public OnFilterScriptInit()
{
    Data[0] = 0;
    return 1;
}
Loading that, then using reloadfs from the console a few times will crash the server. Using "/rcon reloadfs" ingame doesn't seem to cause the crash for some reason.
Reply
#7

Quote:
Originally Posted by Dabombber
Unfortunately, it seems like large amx files can cause crashes.

pawn Код:
#include <a_samp>

new Data[500000];

public OnFilterScriptInit()
{
    Data[0] = 0;
    return 1;
}
Loading that, then using reloadfs from the console a few times will crash the server. Using "/rcon reloadfs" ingame doesn't seem to cause the crash for some reason.
Continuing on what ****** said, there is a way to fix filesize crashes, and that is to use something like this:

pawn Код:
#pragma dynamic 8192
Change the 8192 to the smallest amount possible. As long as you don't get this:

Код:
Header size:      216 bytes
Code size:       776 bytes
Data size:       528 bytes
Stack/heap size:   16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements:  17904 bytes
you will be fine.

Also, as said in many other topics, either make your own MAX_PLAYERS variable with the amount of players in your server, or redefine SA:MP's MAX_PLAYERS. Don't just use MAX_PLAYERS.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)