diff --git a/system/pages/highscores.php b/system/pages/highscores.php index 213d1534..d7eb7384 100644 --- a/system/pages/highscores.php +++ b/system/pages/highscores.php @@ -41,10 +41,12 @@ if($vocation !== 'all') { $vocationId = $id; $add_vocs = [$id]; - $i = $id + $configVocationsAmount; - while(isset($configVocations[$i])) { - $add_vocs[] = $i; - $i += $configVocationsAmount; + if ($id !== 0) { + $i = $id + $configVocationsAmount; + while (isset($configVocations[$i])) { + $add_vocs[] = $i; + $i += $configVocationsAmount; + } } $query->whereIn('players.vocation', $add_vocs); diff --git a/system/templates/highscores.html.twig b/system/templates/highscores.html.twig index 90f91185..938220e5 100644 --- a/system/templates/highscores.html.twig +++ b/system/templates/highscores.html.twig @@ -20,7 +20,7 @@ @@ -119,7 +119,7 @@ [ALL]
- {% for i in 1..config.vocations_amount %} + {% for i in 0..config.vocations_amount %} {{ config.vocations[i]}}
{% endfor %}