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 opening Steam key" when calling Discord_Initialize #86

Closed
JoshuaDoes opened this issue Dec 7, 2017 · 2 comments
Closed

"Error opening Steam key" when calling Discord_Initialize #86

JoshuaDoes opened this issue Dec 7, 2017 · 2 comments

Comments

@JoshuaDoes
Copy link

I've attempted to get this error to not appear, but to no avail. The game I am working with is not in the Steam Store and I do not have Steam installed. I've attempted to not include this parameter in the call, pass a blank string, pass a pointer to 0, pass "0" as a string, etc and all has failed.

I'm creating a function set that wraps around the discord-rpc DLL library for a Windows scripting language known as AutoIt, and I can't seem to get the initialization to succeed due to this error. Is there something specific I should be passing as a parameter? I can't seem to figure it out by studying the source.

Thanks in advance!

@msciotti
Copy link
Collaborator

msciotti commented Dec 7, 2017

You should be able to pass null. If you pass a value:

""
" "
0
"0"

The code will interpret those as steam app ids, and attempt to register your game to a steam protocol.

So your two options should be:

Discord_Initialize(appId, ref handlers, true, null);

or, you can manually call the proper registration function sometime on startup or installation:

https://github.com/discordapp/discord-rpc/blob/master/src/discord_register.h#L1-L7

And then mark the autoRegistration parameter as false in the Init() like:

Discord_Initialize(appId, ref handlers, false, null);

@JoshuaDoes
Copy link
Author

Thank you for the help, using null worked just fine!

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