# Set Challenge High Score

Grammar — Set the new high score of challengeName to highScore for playerGroup
FlagsNative | Action | Restricted

This action will only work for Blizzard maps.

# Arguments

  • playergroup — PlayerGroup
  • string — Challenge Name
  • int — High Score

Returns — void

native void UISetChallengeHighScore(
	playergroup players,
	string challengeName,
	int highScore,
);

Category: UI / Challenges

# Examples

mods/challenges.sc2modbase.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.sc2modbase.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 {