API reference
API reference
Select your platform
No SDKs available
No versions available

ovr_Leaderboard_WriteEntry Function

Writes a single entry to the leaderboard, returning ovrLeaderboardUpdateStatusHandle indicating whether the update was successful and providing the updated challenge IDs. Error codes
  • 100: Parameter {parameter}: invalid user id: {user_id}
  • 100: Something went wrong.
  • 100: This leaderboard entry is too late for the leaderboard's allowed time window.
A message with type ovrMessage_Leaderboard_WriteEntry will be generated in response.
First call ovr_Message_IsError() to check if an error occurred.
If no error occurred, the message will contain a payload of type ovrLeaderboardUpdateStatusHandle. Extract the payload from the message handle with ovr_Message_GetLeaderboardUpdateStatus().

Signature

ovrRequest ovr_Leaderboard_WriteEntry(const char *leaderboardName, long long score, const void *extraData, unsigned int extraDataLength, bool forceUpdate)

Parameters

leaderboardName: const char * The name of the leaderboard to which the entry should be written.
score: long long The score to be written in the leaderboard.
extraData: const void * A 2KB custom data field that is associated with the leaderboard entry. This can be a game replay or any additional information that provides more context about the entry for the viewer.
extraDataLength: unsigned int The length of the extra data.
forceUpdate: bool If true, the score always updates. This happens even if it is not the user's best score.

Returns