# Set Challenge High Score
Grammar — Set the new high score of challengeName to highScore for playerGroup
Flags —Native|Action|Restricted
This action will only work for Blizzard maps.
# Arguments
playergroup— PlayerGroupstring— Challenge Nameint— High Score
Returns — void
native void UISetChallengeHighScore(
playergroup players,
string challengeName,
int highScore,
);
# Related
Category: UI / Challenges
- Challenge Mode —
void— UISetChallengeMode - Set Challenge High Score —
void— UISetChallengeHighScore - Get Challenge High Score —
int— UIGetChallengeHighScore - Set Challenge Score Text —
void— UISetChallengeScoreText - Set Challenge Completed —
void— UISetChallengeCompleted
# Examples
mods/challenges.sc2mod — base.sc2data/LibChal.galaxy:1875
void libChal_gf_SaveChallengeScoreToBank (int lp_challengeType, int lp_score) {
// Implementation
UISetChallengeHighScore(PlayerGroupSingle(1), libChal_gf_ChallengeName(lp_challengeType), lp_score);
}
mods/challenges.sc2mod — base.sc2data/LibChal.galaxy:1897
if ((lv_score > lv_scorePrev)) {
libChal_gf_SaveChallengeScoreToBank(libChal_gv_cHL_CurrentType, lv_score);
UISetChallengeHighScore(PlayerGroupSingle(1), libChal_gv_cHL_ChallengeName[(libChal_gv_cHL_CurrentType)], lv_score);
}
else {