• 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!

Fatal Error: call to undefined function online_list()

PB3LL

Member
Joined
Oct 30, 2015
Messages
60
Reaction score
9
Fatal error: Uncaught Error: Call to undefined function online_list() in /home/otsmanager/www/public_html/layout/sub/whoisonline.php:33 Stack trace: #0 /home/otsmanager/www/public_html/sub.php(4): require_once() #1 {main} thrown in /home/otsmanager/www/public_html/layout/sub/whoisonline.php on line 33

Seems like i can't view who is online. Is there something wrong I did? any help is much appreciated.
 
Lua:
<?php require_once 'engine/init.php';

$records = mysql_select_multi('SELECT * FROM `server_record` ORDER BY `record` DESC LIMIT 1;');
?>
<br><img src="layout/images/titles/t_plaonline.png"/><p>
<table>
<tr class="yellow"><th>Server Status</th></tr>
<tr><td><b><?php echo $config['site_title'] ?></b> record of players online: <?php echo $records[0]['record'] ?> on <?php echo date("j M Y", $records[0]['timestamp']) ?>.</td></tr>
<tr><td><?php
                                $status = true;
                                if ($config['status']['status_check']) {
                                    @$sock = fsockopen ($config['status']['status_ip'], $config['status']['status_port'], $errno, $errstr, 1);
                                    if(!$sock) {
                                        echo '<b>';
                                        echo $config['site_title'];
                                        echo '</b> is currently offline.';
                                        $status = false;
                                    }
                                    else {
                                        $info = chr(6).chr(0).chr(255).chr(255).'info';
                                        fwrite($sock, $info);
                                        $data='';
                                        while (!feof($sock))$data .= fgets($sock, 1024);
                                        fclose($sock);
                                        echo 'Currently ';
                                        echo user_count_online();
                                        echo ' players are online.';
                                    }
                                }
?></td></tr>
</table>
<?php
$array = online_list();
if ($array) {
    ?>
   
    <table id="onlinelistTable" class="table table-striped table-hover">
        <tr class="yellow">
            <th>Name</th>
            <th>Level</th>
            <th>Vocation</th>
        </tr>
            <?php
            foreach ($array as $value) {
            echo '<tr>';
            echo '<td><a href="characterprofile.php?name='. $value['name'] .'">'. $value['name'] .'</a></td>';
            echo '<td>'. $value['level'] .'</td>';
            echo '<td>'. vocation_id_to_name($value['vocation']) .'</td>';
            echo '</tr>';
            }
            ?>
    </table>

    <?php
}
?>




@Raggaer
 
I am dumb sorry. The function online_list is not defined, perhaps you are missing a require call? Its been a long time since I worked with Znote
 
Back
Top