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

Cant Update Stats or Achievments #102

Open
BiggTurkk opened this issue Jun 19, 2024 · 1 comment
Open

Cant Update Stats or Achievments #102

BiggTurkk opened this issue Jun 19, 2024 · 1 comment

Comments

@BiggTurkk
Copy link

BiggTurkk commented Jun 19, 2024

Ive tried just about everything and no matter what I do I get:

Setting breakpad minidump AppID =
SteamInternal_SetMinidumpSteamID: Caching Steam ID: [API loaded no]

I do not recieve any errors, if i try to fetch stats I always get 0 and I always get False when I fetch achievments.
I am able to print my level and id.

What am I missing?

64bit
I am working with SDK 1.55 64bit (does this work with a newer version)

@BiggTurkk BiggTurkk reopened this Jun 19, 2024
@Baddieus
Copy link

Baddieus commented Jul 24, 2024

Not sure if this is the answer you are looking for, but I was having a tough time getting any achievement to unlock and display for me in my game testing until I found the below answer and added a 'b' to my code:

self.steamworks.UserStats.SetAchievement('EASY_CASUAL')
self.steamworks.UserStats.SetAchievement(b'EASY_CASUAL')

The b before 'EASY_CASUAL' in b'EASY_CASUAL' is used to indicate that the string is a byte string.

In Python, strings are sequences of characters and they are stored as Unicode. However, when you’re dealing with data from files, networks, or APIs, you often need to work with bytes. This is where byte strings come in.

A byte string is a string of bytes, not characters. It doesn’t have an encoding (like UTF-8, ASCII, etc.). When you put a b before a string in Python, you’re telling Python to treat the string as a byte string.

In this case, b'EASY_CASUAL' is a byte string. This is apparently required by the SetAchievement method in the steamworks module. If you’re getting an error or unexpected behavior, you might want to check the documentation or source code of the steamworks module to see if it requires byte strings.

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