[Ajuda] Ranking bugado
#8

tem essa outra parte do codigo talvez esta nela o problema??

pawn Код:
enum rankingEnum
{
    player_Score,
    player_ID
}


stock GetPlayerHighestScores(array[][rankingEnum], left, right)
{
    new
        tempLeft = left,
        tempRight = right,
        pivot = array[(left + right) / 2][player_Score],
        tempVar
    ;
    while(tempLeft <= tempRight)
    {
        while(array[tempLeft][player_Score] > pivot) tempLeft++;
        while(array[tempRight][player_Score] < pivot) tempRight--;

        if(tempLeft <= tempRight)
        {
            tempVar = array[tempLeft][player_Score], array[tempLeft][player_Score] = array[tempRight][player_Score], array[tempRight][player_Score] = tempVar;
            tempVar = array[tempLeft][player_ID], array[tempLeft][player_ID] = array[tempRight][player_ID], array[tempRight][player_ID] = tempVar;
            tempLeft++, tempRight--;
        }
    }
    if(left < tempRight) GetPlayerHighestScores(array, left, tempRight);
    if(tempLeft < right) GetPlayerHighestScores(array, tempLeft, right);
}
Reply


Messages In This Thread
Ranking bugado - by best95 - 24.02.2015, 16:45
Re: Ranking bugado - by #Luca[S]. - 24.02.2015, 16:48
Re: Ranking bugado - by best95 - 24.02.2015, 16:50
Re: Ranking bugado - by #Luca[S]. - 24.02.2015, 16:52
Re: Ranking bugado - by best95 - 24.02.2015, 16:54
Re: Ranking bugado - by #Luca[S]. - 24.02.2015, 17:09
Re: Ranking bugado - by best95 - 24.02.2015, 17:11
Re: Ranking bugado - by best95 - 24.02.2015, 17:13
Re: Ranking bugado - by JonathanFeitosa - 25.02.2015, 00:50
Re: Ranking bugado - by best95 - 26.02.2015, 17:39

Forum Jump:


Users browsing this thread: 3 Guest(s)