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

Error:SteamMatchmaking is null #4

Open
ImRains opened this issue Jun 21, 2024 · 7 comments
Open

Error:SteamMatchmaking is null #4

ImRains opened this issue Jun 21, 2024 · 7 comments
Assignees

Comments

@ImRains
Copy link

ImRains commented Jun 21, 2024

Describe the bug
When I use SteamMultiplayer Peer to create a lobby, this error is reported.
Only my Mac computer will report this error, while the Windows computer does not report this error.

To Reproduce
Steps to reproduce the behavior:

Code snippet:
var steam_peer = SteamMultiplayerPeer.new()
steam_peer.create_lobby(SteamMultiplayerPeer.LOBBY_TYPE_PUBLIC)

Screenshots
eoor

Version of GodotSteam:
Godot 4.2.2 - Steamworks 1.59 - GodotSteam Multiplayer Peer 4.8

@ImRains
Copy link
Author

ImRains commented Jun 21, 2024

func _init(): OS.set_environment("SteamAppID", str(480)) OS.set_environment("SteamGameID", str(480)) Steam.steamInit()

I even found that on a Mac computer, when I call these codes, my Steam does not display entering the game Spacewar

@Gramps
Copy link
Member

Gramps commented Jun 21, 2024

Hey there! I know basically nothing about MultiplayerPeer so I cannot speak to that. However, if SteamMatchmaking() is null, then you do not have Steamworks either enabled or present; which is odd because you mention using the pre-compiled version. What does the Mac show when Steam is initialized?

If it will not let you set environment variables you will either have to pass the app ID to the initialization function used as the second argument or you will have to create a steam_appid.txt with 480 in it then set that where ever your editor is located.

@tspring5000
Copy link

Hey, I was also getting this problem (also on Mac), but it looks to resolve itself when you pass the appID to the initialisation function rather than setting the environment variable as suggested above

@Gramps
Copy link
Member

Gramps commented Aug 29, 2024

Does that reliably crash? If so, that should probably be mentioned until it can be fixed (if it can be fixed).

@tspring5000
Copy link

Not so much a crash, just an error in the console, but otherwise to the best of my knowledge it happens every time yeh.
Not sure if its a problem with Godot's OS.set_environment on MacOS, though looking around I can't see anyone else mentioning issues with it outside of GodotSteam

@Gramps
Copy link
Member

Gramps commented Aug 29, 2024

The odd thing is that is exactly what GodotSteam is doing internally when you pass the app ID in:

OS::get_singleton()->set_environment("SteamAppId", itos(app_id));

So I would think it would work with either of them or neither. But maybe I don't understand the difference between how those two things differ; always possible.

@tspring5000
Copy link

Aha, apologies, this was my mistake, I was using SteamAppID where it should be SteamAppId. It's correct in the documentation as well, so purely my error.
I'm not sure if that changed recently, I was following a video tutorial which seemed to use the full caps id, and I guess I just skimmed over that when comparing the documentation

@Gramps Gramps transferred this issue from GodotSteam/GodotSteam Oct 6, 2024
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

4 participants