[Python] Python ctype: argument 2: <class 'Typeerror': wrong type

Discussão em 'Python' iniciado por Stack, Setembro 24, 2024.

  1. Stack

    Stack Membro Participativo

    I use Ren'Py engine and want to implemet Steam leaderboards in to my game. Steamapi has a method SteamUserStats: https://partner.steamgames.com/doc/api/ISteamUserStats#FindOrCreateLeaderboard

    Ren'Py uses ctypes-based binding to the Steamworks API: https://github.com/renpy/renpy-build/blob/master/steamapi/steamapi.py

    In order to deal with leader board I have to create it in Steamworks interface and then use FindLeaderboard function -> I tried it and this function cannot find created leader board, named "topscores".

    I also can use FindOrCreateLeaderboard function to create a leaderboard, but in this case I have an error: "argument 2: <class 'Type error': wrong type"

    I have connection to Steam, as other functions, like checking achievements, work. Please advise what I can do. Thanks.

    the code I use:

    # find my leaderboard
    def find_board():
    leaderboard_name = achievement.steamapi.SteamUserStats().FindOrCreateLeaderboard("topscores", 2, 1)
    return leaderboard_name


    I expected it to work.

    Continue reading...

Compartilhe esta Página