Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

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

This function is free to use.

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


GameKit.Score.SetShouldSetDefaultLeaderboard - GameKit.SelectChallengeablePlayers