PDA

View Full Version : |Pedido| Ajuda com este erro no ranking



jhuletys
14/10/2017, 06:01 PM
Boa tarde galera,

Estou criando um servidor e estou tendo está mensagem ao selecionar o ranking tanto quanto level/reset/pk etc.

[Only registered and activated users can see links] título.jpg

Já ranking de guild está normal.

Alguém sabe o que pode ser?

russo1
14/10/2017, 07:06 PM
Tópico movido para areá correta
Tenha mais atenção da próxima vez por favor
pedido de suporte é em Mu [ Suporte/Dúvidas ]

louis
14/10/2017, 07:22 PM
Boa tarde galera,

Estou criando um servidor e estou tendo está mensagem ao selecionar o ranking tanto quanto level/reset/pk etc.

[Only registered and activated users can see links] título.jpg

Já ranking de guild está normal.

Alguém sabe o que pode ser?

Veja o que tem nessa linha 79 do arquivo e cola aqui pra gente analisar ^^

jhuletys
14/10/2017, 07:28 PM
Veja o que tem nessa linha 79 do arquivo e cola aqui pra gente analisar ^^

Desculpe Louis.
Está ai,


<?php
if (basename($_SERVER["REQUEST_URI"]) === basename(__FILE__))
{
exit('<b>Erro</b>: N&atilde;o acesse o arquivo direto.');
}
?>
<?php

class Ranking extends Conectar
{
private static $_instancia = null;

protected function __construct()
{
parent::Conect();
}

public static function GoInstancia()
{
if(self::$_instancia == null);
self::$_instancia = new self;

return self::$_instancia;
}

public function GerarRank()
{
if($_POST['Gerar_rank']) {
$this->ns = $_POST['ns'];
$this->rank = $_POST['rank'];
$this->tipo = $_POST['tipo'];
if(empty($this->ns) || empty($this->rank)) {
echo "<div id=erro>Existe campos em branco.</div>";
} else {
if($this->rank === guild) {
$this->query = 'SELECT TOP '.$this->ns.' G_Name,G_Score,G_Master from Guild order by G_Score '.$this->tipo.', G_Name ASC, G_Master ASC';
$this->qe = mssql_fetch_array(mssql_query("SELECT * from Guild order by G_Score desc"));
if($this->qe[G_Name] == NULL) {
echo "<div id=erro>Nenhuma guild encontrada no momento.</div>";
} else {
echo '<br><table width="100%" border="0" id="letras" cellpadding="10" cellspacing="0" style="border:thin solid #CCC;">
<tr align="center" style="text-shadow: 0.1em 0.1em #000;">
<td width="25%" bgcolor="#333" style="color:#C2CCCC">#</td>
<td width="25%" bgcolor="#333" style="color:#C2CCCC">Nome</td>
<td width="25%" bgcolor="#333" style="color:#C2CCCC">Pontuação</td>
<td width="25%" bgcolor="#333" style="color:#C2CCCC">Dono</td>
</tr>';
$this->result = mssql_query($this->query);
for($i=0;$i < mssql_num_rows($this->result);++$i)
{
$this->row = mssql_fetch_row($this->result);
$this->rk = $i+1;
echo '<tr align=center bgcolor=#F5F5F5>
<td>'.$this->rk.'</td>
<td>'.$this->row[0].'</td>
<td>'.$this->row[1].'</td>
<td>'.$this->row[2].'</td>
</tr>';
}}
echo "</table>";
} else {
if($this->rank === "clevel") {
$this->qwes = "experience";
} else {
$this->qwes = "clevel";
}
$this->qe = mssql_fetch_array(mssql_query("SELECT * from Character where ctlcode=0 order by ".$this->qwes." desc"));
if($this->qe[Name] == NULL) {
echo "<div id=erro>Nenhuma personagem encontrado no momento.</div>";
} else {
echo '<br><table width="100%" border="0" id="letras" cellpadding="10" cellspacing="0" style="border:thin solid #CCC;">
<tr align="center" style="text-shadow: 0.1em 0.1em #000;">
<td width="25%" bgcolor="#333" style="color:#C2CCCC">#</td>
<td width="25%" bgcolor="#333" style="color:#C2CCCC">Personagem</td>
<td width="25%" bgcolor="#333" style="color:#C2CCCC">Classe</td>
<td width="25%" bgcolor="#333" style="color:#C2CCCC">Pontuação</td>
</tr>';
$this->query = 'SELECT TOP '.$this->ns.' Name,'.$this->rank.',class from Character where ctlcode=0 ORDER BY '.$this->rank.' '.$this->tipo.', ".$this->qwes." desc';
$this->result = mssql_query($this->query);
for($i=0;$i < mssql_num_rows($this->result);++$i)
{
$this->row = mssql_fetch_row($this->result);
if ($this->result === false) {
echo "<div id=erro>Nenhum resultado encontrado!</div>";
}
else{
$this->rk = $i+1;
if($this->row[2] == 0){ $this->row[2] = 'DW';
}
if($this->row[2] == 1){ $this->row[2] = 'SM';
}
if($this->row[2] == 3){ $this->row[2] = 'GM';
}
if($this->row[2] == 16){ $this->row[2] = 'DK';
}
if($this->row[2] == 17){ $this->row[2] = 'BK';
}
if($this->row[2] == 18){ $this->row[2] = 'BM';
}
if($this->row[2] == 32){ $this->row[2] = 'ELF';
}
if($this->row[2] == 33){ $this->row[2] = 'ME';
}
if($this->row[2] == 34){ $this->row[3] = 'HE';
}
if($this->row[2] == 48){ $this->row[2] = 'MG';
}
if($this->row[2] == 64){ $this->row[2] = 'DL';
}
if($this->row[2] == 65){ $this->row[3] = 'LE';
}
if($this->row[2] == 80){ $this->row[2] = 'SUM';
}
if($this->row[2] == 81){ $this->row[2] = 'BS';
}
if($this->row[2] == 82){ $this->row[2] = 'DM';
}
echo '<tr align=center bgcolor=#F5F5F5>
<td>'.$this->rk.'</td>
<td>'.$this->row[0].'</td>
<td>'.$this->row[2].'</td>
<td><b>'.$this->row[1].'</b></td>
</tr>
';
}}
echo "</table><br>";
}}}}
}
}
?>

louis
14/10/2017, 07:39 PM
@jhuletys ([Only registered and activated users can see links])

Tenta trocar essa linha:


$this->query = 'SELECT TOP '.$this->ns.' Name,'.$this->rank.',class from Character where ctlcode=0 ORDER BY '.$this->rank.' '.$this->tipo.', ".$this->qwes." desc';

por


$this->query = 'SELECT TOP '.$this->ns.' Name,'.$this->rank.',class from Character where ctlcode=0 ORDER BY '.$this->rank.' desc, ".$this->qwes." desc';

jhuletys
14/10/2017, 08:01 PM
@jhuletys ([Only registered and activated users can see links])

Tenta trocar essa linha:



por

Quanta eficiência! (y)

Show de bola, funcionou!

Obrigado Louis.

Podem fechar o tópico!