PAWNO crashes/lags
#1

I have no idea why does this happen...

As soon as I add this specific piece of code PAWNO starts lagging hardly and crashing...

Код:
stock SetPlayerRank(playerid)
{
	new score = GetPlayerScore(playerid);
	switch(score)
	{
	    case 0..499: PlayerRank[playerid] = 1;
	    case 500..1999: PlayerRank[playerid] = 2;
	    case 2000..3999: PlayerRank[playerid] = 3;
        case 4000..7999: PlayerRank[playerid] = 4;
        case 8000..9999: PlayerRank[playerid] = 5;
        case 10000..14999: PlayerRank[playerid] = 6;
        case 15000..24999: PlayerRank[playerid] = 7;
        case 25000..29999: PlayerRank[playerid] = 8;
        case 30000..39999: PlayerRank[playerid] = 9;
        case 40000..99999: PlayerRank[playerid] = 10;
	}
	return 1;
}
I've tried various ways, like instead of switch with if(GetPlayerScore...) without new score = GetPlayerScore and everything I know...

How can I fix that? Is there any other way to set rank of player?
Reply


Messages In This Thread
PAWNO crashes/lags - by LocMax - 04.02.2014, 15:32
Re: PAWNO crashes/lags - by Borg - 04.02.2014, 15:53
Re: PAWNO crashes/lags - by PowerPC603 - 04.02.2014, 16:35
Re: PAWNO crashes/lags - by LocMax - 04.02.2014, 16:45

Forum Jump:


Users browsing this thread: 1 Guest(s)