• Resolved flexdope

    (@flexdope)


    Hello guys,
    I am using plugin Game Server Status and everything works fine (except showing players) on Counter-Strike (source mode) servers.

    When I add server and then display with short code, it displays everything including online status, but on online players/max players I have column Array/Array.

    I am using PHP version 5.6 and before 7.1 and also not work. So I don’t know, where is the problem.

    Sorry for my pretty bad english, I hope, you understand what I try to explain you.
    Thank you and have a nice day!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter flexdope

    (@flexdope)

    Okey I find the solution.

    You need delete line 54 in file shortcodes.php and put there:

    $online_players = '';
    $maximum_players = '';
    
    is_array( $server_info['general']['online_players'] ) ? $online_players = $server_info['general']['online_players']['value'] : $online_players = $server_info['general']['online_players'];
    
    is_array( $server_info['general']['maximum_online_players'] ) ? $maximum_players = $server_info['general']['maximum_online_players']['value'] : $maximum_players = $server_info['general']['maximum_online_players'];
    
    $content .= '<strong>' . __('Players:', 'game-server-status') . '</strong> ' . $online_players . '/' . $maximum_players . '<br />';
Viewing 1 replies (of 1 total)
  • The topic ‘Array on Source servers?’ is closed to new replies.