Need help ...
#1

Hi.

Some days ago i created new ranks on my server, and i put this code:
Код:
switch( PlayerInfo[ i ][ Kills ] )
	    {
			case 0 .. 99:        PlayerInfo[ i ][ Rank ] = 1;
		    case 100 .. 199:     PlayerInfo[ i ][ Rank ] = 2;
		    case 200 .. 279:     PlayerInfo[ i ][ Rank ] = 3;
		    case 280 .. 499:     PlayerInfo[ i ][ Rank ] = 4;
		    case 500 .. 599:     PlayerInfo[ i ][ Rank ] = 5;
		    case 600 .. 749:     PlayerInfo[ i ][ Rank ] = 6;
		    case 750 .. 999:     PlayerInfo[ i ][ Rank ] = 7;
		    case 1000 .. 1299:   PlayerInfo[ i ][ Rank ] = 8;
		    case 1300 .. 1499:   PlayerInfo[ i ][ Rank ] = 9;
		    case 1500 .. 1599:   PlayerInfo[ i ][ Rank ] = 10;
		    case 1600 .. 1649:   PlayerInfo[ i ][ Rank ] = 11;
		    case 1650 .. 1799:   PlayerInfo[ i ][ Rank ] = 12;
		    case 1800 .. 2099:   PlayerInfo[ i ][ Rank ] = 13;
		    case 2100 .. 2399:   PlayerInfo[ i ][ Rank ] = 14;
		    case 2400 .. 2799:   PlayerInfo[ i ][ Rank ] = 15;
		    case 2800 .. 3299:   PlayerInfo[ i ][ Rank ] = 16;
		    case 3300 .. 3999:   PlayerInfo[ i ][ Rank ] = 17;
		    case 4000 .. 4999:   PlayerInfo[ i ][ Rank ] = 18;
		    case 5000 .. 5499:   PlayerInfo[ i ][ Rank ] = 19;
		    case 5500 .. 6199:   PlayerInfo[ i ][ Rank ] = 20;
		    case 6200 .. 6999:   PlayerInfo[ i ][ Rank ] = 21;
		    case 7000 .. 8999:   PlayerInfo[ i ][ Rank ] = 22;
		    case 9000 .. 9399:   PlayerInfo[ i ][ Rank ] = 23;
		    case 9400 .. 9999:   PlayerInfo[ i ][ Rank ] = 24;
		    case 10000 .. 14999: PlayerInfo[ i ][ Rank ] = 25;
		    case 15000 .. 19999: PlayerInfo[ i ][ Rank ] = 26;
		    case 20000 .. 21499: PlayerInfo[ i ][ Rank ] = 27;
		    case 21500 .. 24999: PlayerInfo[ i ][ Rank ] = 28;
		    case 25000 .. 28999: PlayerInfo[ i ][ Rank ] = 29;
		    case 29000 .. 30999: PlayerInfo[ i ][ Rank ] = 30;
		    case 31000 .. 37999: PlayerInfo[ i ][ Rank ] = 31;
		    case 38000 .. 44999: PlayerInfo[ i ][ Rank ] = 32;
		    default: 			 PlayerInfo[ i ][ Rank ] = 33;
	    }
and when i leave this code withou /* and */ the compiler runs very slowly and the AMX is 1.600 kb, and when i put this code on /* */ compiler works perfectlly and the AMX is 1.300 kb. What is wrog with this code?
Reply
#2

Where did you put this snippet of code ?
Reply
#3

On a timer ...
Reply
#4

It's normal that the AMX runs slowly you're asking him to do a big job.

By the way uhm timers isn't good...
Reply
#5

Quote:
Originally Posted by Ubuntu
Посмотреть сообщение
It's normal that the AMX runs slowly you're asking him to do a big job.

By the way uhm timers isn't good...
On oldest version on my server i have just 12 ranks, and the amx don't have been 1.600 kbs ...
Reply
#6

Quote:

and when i leave this code withou /* and */ the compiler runs very slowly and the AMX is 1.600 kb, and when i put this code on /* */ compiler works perfectlly and the AMX is 1.300 kb. What is wrog with this code?

+300kb.
Reply
#7

Quote:
Originally Posted by Ubuntu
Посмотреть сообщение
+300kb.
Hey, if you want to help me, just help me, if you want to post useless posts just stay in your bank.

So ... others, what can i do? Some ideas?
Reply
#8

Instead of doing that crap, just set their level when you give them score and save it.
Reply
#9

Thats a huge chunk of code, even though you're using " .. " to make it appear smaller, it is still pretty much as large, seeing as you've added this code the size increases thus the complie time has increased.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)