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

ctypes error when pushing Float Stat #40

Open
kennex-software opened this issue May 9, 2020 · 1 comment
Open

ctypes error when pushing Float Stat #40

kennex-software opened this issue May 9, 2020 · 1 comment
Labels
bug Stuff related to general bugs

Comments

@kennex-software
Copy link

Hey Gramps!

I tried to push a Float Stat to Steam and received this error:
ctypes.ArgumentError: argument 2: <class 'TypeError'>: Don't know how to convert parameter 2

I saw on Stackoverflow, this link: [(https://stackoverflow.com/questions/33710211/how-does-ctypes-know-when-to-throw-argumenterror-but-only-sometimes)]

If I change the SetStat in the UserStats to:

return self.steam.SetStatFloat(name, c_float(value))

Then all works well! Just thought I'd let you know!

@Gramps Gramps added the bug Stuff related to general bugs label May 9, 2020
@Gramps
Copy link
Collaborator

Gramps commented May 9, 2020

Yeah, in my next update I am moving things back to SetStatInt and SetStatFloat; which, obviously, causes less problems. Right now I'm just bogged down in callbacks and getting my current game ready for Steam Game Festival, but the SteamworksPy update should be in a week or two! And it's big!

Thanks for the update on that!

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

No branches or pull requests

2 participants