• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[REP+ if solved] NICAW TROUBLE!

Jag

New Member
Joined
Oct 28, 2007
Messages
28
Reaction score
0
Hello!

I have recently got an error in nicaw aac...

This is what happens when i press the "Who Is Online" button

Code:
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

and this is my online-list.php on line 34
Code:
                throw new DatabaseException('Your server does not store information on players online state.');

I have reset my htdocs folder but the error is still remaining.
 
Hello!

I have recently got an error in nicaw aac...

This is what happens when i press the "Who Is Online" button

Code:
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

and this is my online-list.php on line 34
Code:
                throw new DatabaseException('Your server does not store information on players online state.');

I have reset my htdocs folder but the error is still remaining.
OMG :O

Could you show whole content of file, not only error?
 
online-list.php
Code:
<?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");?>
 
problem fix

change this :
Code:
$SQL->myQuery('SELECT name, vocation, level FROM players WHERE online = 1 ORDER BY name ASC');

to this

Code:
$SQL->myQuery('SELECT name, vocation, level FROM players WHERE status = 1 ORDER BY name ASC');
 
Back
Top