Online List problem

Status
Zamknięty.

GM Kamo

Advanced User
Zarejestrowany
Dołączył
Luty 12, 2009
Posty
168
Liczba reakcji
6
Witam, posiadam silnik SQL(Avesta) i w moim acc makerze(nicaw) jest funkcja ktora pokazuje liste osob online na serwerze, niestety ta funkcja nie dziala,
Fatal error: Uncaught exception 'DatabaseException'
Message: Your server does not store information on players online state.
File: online-list.php on line: 34
Script was terminated because something unexpected happened. You can report this, if you think it's a bug.

Debug Backtrace:Disabled
Jestem pewien ze moj serwer jest w stanie obslugiwac ten skrypt. tutaj go zamieszaczam:
include ("include.inc.php");
$ptitle="Online Players - $cfg[server_name]";
include ("header.inc.php");
?>
<div id="content">
<div class="top">Online Players</div>
<div class="mid">
<?php
$SQL = AAC::$SQL;
try {
$SQL->myQuery('SELECT name, vocation, level FROM players WHERE online = 1 ORDER BY name ASC');
} catch(DatabaseQueryException $e) {
try {
$SQL->myQuery('SELECT name, vocation, level FROM players WHERE lastlogin > lastlogout ORDER BY name ASC');
} catch(DatabaseQueryException $e) {
throw new DatabaseException('Your server does not store information on players online state.');
}
}

if ($SQL->num_rows() == 0) {
echo 'Nobody is online :-O';
} else {

$i = 0;
echo '<table><tr class="color0"><td style="width:150px"><b>Name</b></td><td style="width:150px"><b>Vocation</b></td><td style="width:60px"><b>Level</b></td></tr>';
while ($player = $SQL->fetch_array()) {
$i++;
echo '<tr '.getStyle($i).'><td><a href="characters.php?player_name='.urlencode($player['name']).'">'.htmlspecialchars($player['name']).'</a></td><td>'.htmlspecialchars($cfg['vocations'][$player['vocation']]['name']).'</td><td>'.$player['level'].'</td></tr>'."\n";
}
}
?>
</table>
</div>
<div class="bot"></div>
</div>
<?php include ("footer.inc.php");?>
Tutaj widac ze on pobiera te dane z odpowiedniej tabelki z bazy danych
pytanie tylko co to za tabelka, i czy da sie ten blad jakos naprawic

Z gory dziekuje!
 
Odp: Online List problem

ten sam skrypt ten sam problem
<?php
include ("include.inc.php");
$ptitle="Online Players - $cfg[server_name]";
include ("header.inc.php");
?>
<div id="content">
<div class="top">Gracze Online</div>
<div class="mid">
<?php
$SQL = AAC::$SQL;
try {
$SQL->myQuery('SELECT name, vocation, level FROM players WHERE online = 1 ORDER BY name ASC');
} catch(DatabaseQueryException $e) {
try {
$SQL->myQuery('SELECT name, vocation, level FROM players WHERE lastlogin > lastlogout ORDER BY name ASC');
} catch(DatabaseQueryException $e) {
throw new DatabaseException('Your server does not store information on players online state.');
}
}

if ($SQL->num_rows() == 0) {
echo 'Nobody is online :-O';
} else {

$i = 0;
echo '<table><tr class="color0"><td style="width:150px"><b>Name</b></td><td style="width:150px"><b>Vocation</b></td><td style="width:60px"><b>Level</b></td></tr>';
while ($player = $SQL->fetch_array()) {
$i++;
echo '<tr '.getStyle($i).'><td><a href="characters.php?player_name='.urlencode($player['name']).'">'.htmlspecialchars($player['name']).'</a></td><td>'.htmlspecialchars($cfg['vocations'][$player['vocation']]['name']).'</td><td>'.$player['level'].'</td></tr>'."\n";
}
}
?>
</table>
</div>
<div class="bot"></div>
</div>
<?php include ("footer.inc.php");?>

Fatal error: Access to undeclared static property: AAC::$SQL in C:\xampp\htdocs\online-list.php on line 27
Tez Prosze O Pomoc W Tym Temacie
 
Odp: Online List problem

Od?wie?am Bo Padaka Nikt Nie pomo?e sry ze 1h wczesiej:(
 
Odp: Online List problem

Ja ?ci?gn??em ten acc maker i sprawdzi?em i dzia?a wszystko ;) Czy tw?j ots dzia?a pod portem 7171? Masz poprawnie prowadzone IP?


Chyba, ?e ten skrypt nie odpowiada pod ten silnik ;]
 
Odp: Online List problem

Ip Sprawdzone dziala pod portem 7171 silnik obsluguje to jest cos z accmeakerem bo zmienialem na innego nicawa w ktorym byl ten skrypt i dzialala ta lista ale nie dzialal accmeaker
a w moim starym jak dodalem ta liste to dziala accmeaker a niedziala ta lista :(
i wyskakuje ten blad
Fatal error: Access to undeclared static property: AAC::$SQL in C:\xampp\htdocs\online-list.php on line 27

27 linijka wyglada tak : $SQL = AAC::$SQL;
zaminilem ja na : $SQL = new SQL();
i teraz jest cos takiego dalej kminie sam
Attempt to count failed query
Error #1054
SELECT name, vocation, level FROM players WHERE online = 1 ORDER BY name ASC
Unknown column 'online' in 'where clause'

sql.php on line: 87
Script was terminated because something unexpected happened. You can report this, if you think it's a bug.
 
Status
Zamknięty.
Back
Do góry