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

ovr_Leaderboard_WriteEntryWithSupplementaryMetric Function

Writes a single entry to a leaderboard, can include supplementary metrics 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_WriteEntryWithSupplementaryMetric 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_WriteEntryWithSupplementaryMetric(const char *leaderboardName, long long score, long long supplementaryMetric, const void *extraData, unsigned int extraDataLength, bool forceUpdate)

Parameters

leaderboardName: const char * The leaderboard for which to write the entry.
score: long long The score to write.
supplementaryMetric: long long A metric that can be used for tiebreakers.
extraData: const void * A 2KB custom data field that is associated with the leaderboard entry. This can be a game replay or anything that provides more detail about the entry to the viewer.
extraDataLength: unsigned int The length of the extra data.
forceUpdate: bool If true, the score always updates. This happens ecen if it is not the user's best score.

Returns