pawno stops working
#1

So I have made this;

Код:
stock SetRank(playerid)
{
	switch(PlayerInfo[playerid][Score])
	{
	    case 0..499: SetPlayerScore(playerid, 1);
	    case 500..1499: SetPlayerScore(playerid, 2);
	    case 1500..2999: SetPlayerScore(playerid, 3);
	    case 3000..4999: SetPlayerScore(playerid, 4);
	    case 5000..6999: SetPlayerScore(playerid, 5);
	    case 7000..8999: SetPlayerScore(playerid, 6);
	    case 9000..11999: SetPlayerScore(playerid, 7);
	    case 12000..14999: SetPlayerScore(playerid, 8);
	    case 15000..19999: SetPlayerScore(playerid, 9);
	    case 20000..24999: SetPlayerScore(playerid, 10);
	    case 25000..29999: SetPlayerScore(playerid, 11);
	    case 30000..34999: SetPlayerScore(playerid, 12);
	    case 35000..44999: SetPlayerScore(playerid, 13);
	    case 45000..54999: SetPlayerScore(playerid, 14);
	    case 55000..79999: SetPlayerScore(playerid, 15);
	    case 80000..99999: SetPlayerScore(playerid, 16);
	}
	return 1;
}
and whenever I go to compile with it, the PAWNO stops working, it takes like 5 minutes for it to start responding and it's always when I add that specific thing.

Any ideas why does it happen?
Reply
#2

Well.. All I can think of for starters is to make sure you're using the pawno that comes with your server file, in the pawno folder. Also when you're compiling (no matter what it is) it could take awhile.
Reply
#3

It's usual that your pawno loads slowly if you got so many lines.
Reply
#4

Well how could I be able to set player's rank then?
any other ways?
Reply
#5

Quote:
Originally Posted by LocMax
Посмотреть сообщение
Well how could I be able to set player's rank then?
any other ways?
If the problem is only when you add that portion of code try using other alternative ways..

pawn Код:
new score = PlayerInfo[playerid][Score];
if(score >= 0 && score <= 499)
    SetPlayerScore(playerid, 1);
else if(score >= 500 && score < 1500)
    SetPlayerScore(playerid, 2);
and so on..
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)