amx file is way to big
#1

-- DELETED --
Reply
#2

Over use of those variables, in-particular arrays will cause this.
Reply
#3

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?
Reply
#4

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.
Reply
#5

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.
Reply
#6

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
Reply
#7

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..
Reply
#8

How do you define a "big" variable, can you provide us a sample?
Reply
#9

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 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)