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

Strange error with Geisor

Anyone care to help?

Code:
    // STATUS CHECKER
    $statustimeout = 1;
    foreach(explode("*", str_replace(" ", "", $config['server']['statusTimeout'])) as $status_var)
        if($status_var > 0)
            $statustimeout = $statustimeout * $status_var;
    $statustimeout = $statustimeout / 1000;
    $config['status'] = parse_ini_file('cache/DONT_EDIT_serverstatus.txt');
    if($config['status']['serverStatus_lastCheck']+$statustimeout < time())
    {
        $config['status']['serverStatus_checkInterval'] = $statustimeout+3;
        $config['status']['serverStatus_lastCheck'] = time();
        $statusInfo = new ServerStatus($config['server']['ip'], $config['server']['statusProtocolPort'], 1);
        if($statusInfo->isOnline())
        {
            $config['status']['serverStatus_online'] = 1;
            $config['status']['serverStatus_players'] = $statusInfo->getPlayersCount();
            $config['status']['serverStatus_playersMax'] = $statusInfo->getPlayersMaxCount();
            $h = floor($statusInfo->getUptime() / 3600);
            $m = floor(($statusInfo->getUptime() - $h*3600) / 60);
            $config['status']['serverStatus_uptime'] = $h.'h '.$m.'m';
            $config['status']['serverStatus_monsters'] = $statusInfo->getMonsters();
        }
        else
        {
            $config['status']['serverStatus_online'] = 0;
            $config['status']['serverStatus_players'] = 0;
            $config['status']['serverStatus_playersMax'] = 0;
        }
        $file = fopen("cache/DONT_EDIT_serverstatus.txt", "w");
        $file_data = '';
        foreach($config['status'] as $param => $data)
        {
    $file_data .= $param.' = "'.str_replace('"', '', $data).'"
    ';
        }
        rewind($file);
        fwrite($file, $file_data);
        fclose($file);
    }
 
Last edited:
Back
Top