Higher capacity of 100mb GameMode
#1

My GameMode after I finished the phone system using textdraw it has capacities up to 114MB. Does not matter what happens to run on the server? I was a little worried because this is the first time I saw GameMode + 100MB capacities.
Reply
#2

haha xD
Reply
#3

2 kiloBytes , turned into 114,0o090..... MegaBytes!! what the hell is this program doing :* :] :3 <3
Reply
#4

This is the most trolliest thread I've ever seen.
Reply
#5

This is just impossible, your script is like 75 lines max judging from the scroll bar

Unless your includes have some sort of data madness.

Using switch-case can cause this though.
Reply
#6

switch and case doesn't effect the size mostly.

Its because you use 3D or higer arrays. For example: new array[MAX_PLAYERS][MAX_PLAYERS][3];
If you increase that 3 to more higher value, the size will increase rapidly, actually MAX_PLAYERS is itself a point of concern.

Most important thing is the array size. Higher the array size, more is the output file size. I always make use of 2D arrays or 1D arrays instead of doing all in one 3D array.

Next thing which may effect is that you are using a lot of high conditional loops.
Reply
#7

Quote:
Originally Posted by Gammix
View Post
switch and case doesn't effect the size mostly.
It does, if he has something like this, it will cause it. I just pointed it out since if he is doing this at the script it might be a cause, but it would not be as big as 100mb, unless he's doing something very very wrong.

This for example gives you an extra 100kb

The reason for that to happen is because the script checks the script if it's like if(number == 1) if(number == 2) if (number == 3) if (number == 4) etc. etc. all the way up to 10000 so ibnstead checking if the number is higher or lower is better.
pawn Code:
stock ReturnString(number)
{
    new String[22];
    switch(number)
    {
        case 1..99:  String = "something1";
        case 100..999:  String = "something2";
        case 1000..9999:  String = "something3";
    }
    return String;
}
Reply
#8

@7Ahmad7 i don't have idea . Im using Socket for split my gamemode in to Include folder so that why file pwn till 2kb. In real base file Pwn is 5.6MB.

@Tamer my gamemode got 130k line man ! There just an little warning tag from compiler -_-. I think that may be is problem with my Mysql System for loading sms inbox. Anyway im decreased it down to 58.MB now .
Reply
#9

Quote:
Originally Posted by Tamer
View Post
It does, if he has something like this, it will cause it. I just pointed it out since if he is doing this at the script it might be a cause, but it would not be as big as 100mb, unless he's doing something very very wrong.

This for example gives you an extra 100kb

The reason for that to happen is because the script checks the script if it's like if(number == 1) if(number == 2) if (number == 3) if (number == 4) etc. etc. all the way up to 10000 so ibnstead checking if the number is higher or lower is better.
pawn Code:
stock ReturnString(number)
{
    new String[22];
    switch(number)
    {
        case 1..99:  String = "something1";
        case 100..999:  String = "something2";
        case 1000..9999:  String = "something3";
    }
    return String;
}
Well, actually no. Internally switch works more like goto statements. One of the reasons its faster.

And unnecessarily saving 100kb which hurts performance is just plain stupid, its not the 70's anymore where every byte matters.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)