EOS_Achievements_UnlockAchievements

EOS API reference page for EOS_Achievements_UnlockAchievements

3 mins to read

This function is part of the Achievements Interface.

Remarks

Unlocks a number of achievements for a specific player.

Return Value

  • EOS_Success if the operation completes successfully

  • EOS_InvalidParameters if any of the options are incorrect

Parameters

EOS_Achievements_UnlockAchievements

Parameter Type And NameUsage Information
EOS_HAchievements Handle
const EOS_Achievements_UnlockAchievementsOptions* OptionsStructure containing information about the achievements and the player whose achievements we're unlocking.
void* ClientDataArbitrary data that is passed back to you in the CompletionDelegate
const EOS_Achievements_OnUnlockAchievementsCompleteCallback CompletionDelegateThis function is called when the unlock achievements operation completes.

Callback Function Information

Because this function is asynchronous, it employs a callback of type EOS_Achievements_OnUnlockAchievementsCompleteCallback to report the results of its operation. See the EOS_Achievements_OnUnlockAchievementsCompleteCallbackInfo page for more details, or check the [Callback Data] section below.

Callback Remarks

Function prototype definition for callbacks passed to EOS_Achievements_UnlockAchievements

Callback Parameters

EOS_Achievements_OnUnlockAchievementsCompleteCallback

Parameter Type And NameUsage Information
const EOS_Achievements_OnUnlockAchievementsCompleteCallbackInfo* DataAn EOS_Achievements_OnUnlockAchievementsCompleteCallbackInfo containing the output information and result

Callback Data

The EOS SDK passes the following data structure to the callback function:

EOS_Achievements_OnUnlockAchievementsCompleteCallbackInfo

PropertyValue
EOS_EResult ResultCodeThe EOS_EResult code for the operation. EOS_Success indicates that the operation succeeded; other codes indicate errors.
void* ClientDataContext that was passed into EOS_Achievements_UnlockAchievements.
EOS_ProductUserId UserIdThe Product User ID of the user who initiated this request.
uint32_t AchievementsCountThe number of achievements that the operation unlocked.

For more information, see the EOS_Achievements_OnUnlockAchievementsCompleteCallbackInfo page.