Hello.
I'm using Nicaw AAC for my website, everything works fine except two things and that is the "Houses" and "Who is online?" pages.
When i try to enter the page called "Houses" i get this error:
Here is my code for house.php:
Also when i try to enter the "Who is online?" page i get this error:
Here is my code for online-list.php:
I'm using Nicaw AAC for my website, everything works fine except two things and that is the "Houses" and "Who is online?" pages.
When i try to enter the page called "Houses" i get this error:
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 Backtraceisabled
Here is my code for house.php:
<?php
/*
Copyright (C) 2007 - 2009 Nicaw
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
include ("include.inc.php");
$ptitle="Houses - $cfg[server_name]";
include ("header.inc.php");
if (!is_file($cfg['dirdata'].$cfg['house_file']))
throw new aacException('House file not found: '.$cfg['dirdata'].$cfg['house_file']);
?>
<div id="content">
<div class="top">Houses</div>
<div class="mid">
<div style="height: 500px; overflow: auto; margin: 10px;">
<table>
<tr class="color0"><td width="35%"><b>House</b></td><td width="25%"><b>Location</b></td><td width="25%"><b>Owner</b></td><td><b>Size</b></td><td><b>Rent</b></td></tr>
<?php
$HousesXML = simplexml_load_file($cfg['dirdata'].$cfg['house_file']);
$MySQL = AAC::$SQL;
$MySQL->myQuery('SELECT `players`.`name`, `houses`.`id` FROM `players`, `houses` WHERE `houses`.`owner` = `players`.`id`;');
while ($row = $MySQL->fetch_array()){
$houses[(int)$row['id']] = $row['name'];
}
foreach ($HousesXML->house as $house){
$i++;
$list.= '<tr '.getStyle($i).'><td>'.htmlspecialchars($house['name']).'</td><td>'.htmlspecialchars($cfg['temple'][(int)$house['townid']]['name']).'</td><td>'.$houses[(int)$house['houseid']].'</td><td>'.$house['size'].'</td><td>'.$house['rent'].'</td></tr>'."\r\n";
}
echo $list;
?>
</table>
</div>
</div>
<div class="bot"></div>
</div>
<?php include('footer.inc.php');?>
Also when i try to enter the "Who is online?" page i get this error:
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 Backtraceisabled
Here is my code for online-list.php:
<?php
/*
Copyright (C) 2007-2008 Nicaw
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
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");?>
Last edited: