You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (GCLeaderboards::current_leaderboard_ == INVALID_LEADERBOARD) returnfalse;
will exit the function).
The first call to steam_upload_score() will fail because find_leaderboard() won't return any leaderboard, instead, it will invoke a callback that will fetch the leaderboard asynchronously. This means as long as that callback isn't here, we won't get any leaderboards, and steam_upload_score() will keep failing.
This is the case for all of these functions:
steam_upload_score_ext()
steam_download_scores()
steam_download_scores_around_user()
steam_download_friends_scores()
As ENIGMA is single-threaded, I would like to handle this in a way such that, those functions will succeed on their first call.
A possible solution to this is to call the above functions from the callback itself as we do here. In this utils directory, we attach a payload to our callbacks in order to use it when the callback is here. You can do the same by attaching a payload containing the leaderboard name and the type of function to call.
The text was updated successfully, but these errors were encountered:
YoungHypo
added a commit
to YoungHypo/enigma-dev
that referenced
this issue
Mar 17, 2024
Regarding the leaderboard API, when you call functions like
steam_upload_score()
, the function starts to find the leaderboard at first as in line 233enigma-dev/ENIGMAsystem/SHELL/Universal_System/Extensions/Steamworks/leaderboards.cpp
Line 233 in 3918af3
This is incorrect as the first call for this function will be useless and will fail because at first there is no leaderboard handle stored (this check
enigma-dev/ENIGMAsystem/SHELL/Universal_System/Extensions/Steamworks/gameclient/gc_leaderboards.cpp
Line 124 in 3918af3
The first call to
steam_upload_score()
will fail becausefind_leaderboard()
won't return any leaderboard, instead, it will invoke a callback that will fetch the leaderboard asynchronously. This means as long as that callback isn't here, we won't get any leaderboards, andsteam_upload_score()
will keep failing.This is the case for all of these functions:
As ENIGMA is single-threaded, I would like to handle this in a way such that, those functions will succeed on their first call.
A possible solution to this is to call the above functions from the callback itself as we do here. In this utils directory, we attach a payload to our callbacks in order to use it when the callback is here. You can do the same by attaching a payload containing the leaderboard name and the type of function to call.
The text was updated successfully, but these errors were encountered: