Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GameServerItem.server_name is always empty #212

Open
cndheat opened this issue Sep 24, 2024 · 1 comment
Open

GameServerItem.server_name is always empty #212

cndheat opened this issue Sep 24, 2024 · 1 comment

Comments

@cndheat
Copy link

cndheat commented Sep 24, 2024

Setting server name:

    server.set_server_name("my server");
    server.set_map_name("Test Map");

Getting server name from GameServerItem after query has finished refreshing:

    for i in 0..request.get_server_count().unwrap_or(0) {
        if let Ok(server) = request.get_server_details(i) {
            println!("{:?}", server.server_name);
            println!("{:?}", server.map);
        }
    }

Console output (name is empty, map is correct):

""
"Test Map"

Preview on Steam server browser (the name / map are being displayed correctly):
image

Not sure what's causing this (if it's something I've done wrong, or an issue with the crate)

@ymo-4
Copy link
Contributor

ymo-4 commented Sep 29, 2024

Send us the full code, please. Or the code of a simple program that shows the issue.

Everything works for me using client.matchmaking_servers().ping_server(): https://gist.github.com/ymo-4/dc49a1f8737c70cd9cdd82c74480b5c3

Upd: also there was a bug with server.set_server_name() fixed in 4e529e0 which still not on crates.io. Check if this might be the cause of this behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants