amx file is way to big -
danielpalade - 30.01.2017
-- DELETED --
Re: amx file is way to big -
Sew_Sumi - 30.01.2017
Over use of those variables, in-particular arrays will cause this.
Re: amx file is way to big -
danielpalade - 30.01.2017
Quote:
Originally Posted by Sew_Sumi
Over use of those variables, in-particular arrays will cause this.
|
Ow.. I do have a variable which I use quite often. Can't I do anything to keep using that same variable?
Re: amx file is way to big -
Sew_Sumi - 30.01.2017
https://sampforum.blast.hk/showthread.php?tid=177114
This is a thread that explains things a bit more. It's a common problem, but it doesn't mean you have to rip out variables, you just have to use them better and not make as big a variables.
Like when you use string, instead of making them 256, you can make them simply 144 if they are for display on the players screen.
Your arrays may have massive size, when they don't actually need to be that big.
Re: amx file is way to big -
danielpalade - 30.01.2017
Quote:
Originally Posted by Sew_Sumi
https://sampforum.blast.hk/showthread.php?tid=177114
This is a thread that explains things a bit more. It's a common problem, but it doesn't mean you have to rip out variables, you just have to use them better and not make as big a variables.
Like when you use string, instead of making them 256, you can make them simply 144 if they are for display on the players screen.
Your arrays may have massive size, when they don't actually need to be that big.
|
The thing is, I commented out everything that had to do with that variabile. And it didn't change anything. The size was still around 60mb.
Re: amx file is way to big -
BiosMarcel - 30.01.2017
Quote:
Originally Posted by danielpalade
The thing is, I commented out everything that had to do with that variabile. And it didn't change anything. The size was still around 60mb.
|
You know, most of the time, oversized scripts are not oversized just because of a single variable / array
Re: amx file is way to big -
danielpalade - 30.01.2017
Quote:
Originally Posted by [Bios]Marcel
You know, most of the time, oversized scripts are not oversized just because of a single variable / array
|
Yea.. But as I said, no other variable is "big" or used often..
Re: amx file is way to big -
Beckett - 30.01.2017
How do you define a "big" variable, can you provide us a sample?
Re: amx file is way to big -
Nero_3D - 30.01.2017
Quote:
Originally Posted by danielpalade
Yea.. But as I said, no other variable is "big" or used often..
|
To clarify something, only
global and
local static variables are saved in the amx no matter how often you used them if at least once
I would look for 2, 3 or 4 dimensional global arrays, these are especially memory hungry if wrongly dimensioned
start with redefining MAX_PLAYERS right under #include <a_samp>
PHP код:
#undef MAX_PLAYERS // by default 1000
#define MAX_PLAYERS 500 // your server size