Higher capacity of 100mb GameMode
#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


Messages In This Thread
Higher capacity of 100mb GameMode - by GatsbyTrieu - 28.05.2015, 16:06
Re: Higher capacity of 100mb GameMode - by Imissziu - 28.05.2015, 16:10
Re: Higher capacity of 100mb GameMode - by 7Ahmad7 - 28.05.2015, 22:18
Re: Higher capacity of 100mb GameMode - by Luis- - 28.05.2015, 22:38
Re: Higher capacity of 100mb GameMode - by Tamer - 29.05.2015, 04:49
Re: Higher capacity of 100mb GameMode - by Gammix - 29.05.2015, 06:14
Re: Higher capacity of 100mb GameMode - by Tamer - 29.05.2015, 06:28
Re: Higher capacity of 100mb GameMode - by GatsbyTrieu - 29.05.2015, 10:09
Re: Higher capacity of 100mb GameMode - by Macluawn - 29.05.2015, 11:50

Forum Jump:


Users browsing this thread: 1 Guest(s)