Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4    Statistic    FMM    Blog  

GameKit.Score.SetValue

Sets score value.

Component Version macOS Windows Linux Server iOS SDK
GameKit 8.5 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes
MBS( "GameKit.Score.SetValue"; ScoreIdentifier; Value )   More

Parameters

Parameter Description Example
ScoreIdentifier The identifier for the score object.
Value The new score value.

Result

Returns OK or error.

Description

Sets score value.
The score earned by the player.
You can use any algorithm you want to calculate scores in your game. Your game must set the value property before reporting a score, otherwise an error is returned.
The value provided by a score object is interpreted by Game Center only when formatted for display. You determine how your scores are formatted when you define the leaderboard in App Store Connect.

See also

Created 5th November 2018, last changed 8th November 2018


GameKit.Score.SetShouldSetDefaultLeaderboard - GameKit.SelectChallengeablePlayers

Feedback: Report problem or ask question.