Skip to content

Conversation

@Rushaway
Copy link
Member

Initialize sPlayer to 'unconnected' and adjust chat messages to include the nominator's name conditionally.

Attempt to fix:

L 09/23/2025 - 19:58:50: [SM] Exception reported: Language phrase "7" not found (arg 5)
L 09/23/2025 - 19:58:50: [SM] Blaming: mapchooser_extended/mapchooser_extended.smx
L 09/23/2025 - 19:58:50: [SM] Call stack trace:
L 09/23/2025 - 19:58:50: [SM]   [0] VFormat
L 09/23/2025 - 19:58:50: [SM]   [1] Line 124, include/multicolors.inc::CPrintToChatAll
L 09/23/2025 - 19:58:50: [SM]   [2] Line 425, MCE/addons/sourcemod/scripting/mce/menus.inc::Handler_VoteFinishedGeneric
L 09/23/2025 - 19:58:50: [SM]   [3] Line 524, MCE/addons/sourcemod/scripting/mce/menus.inc::Handler_MapVoteFinished

Initialize sPlayer to 'unconnected' and adjust chat messages to include the nominator's name conditionally.
Updated version number from 1.13.9 to 1.13.10 in mapchooser_extended.inc.
Copilot AI review requested due to automatic review settings September 23, 2025 19:50
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Fixes a SourceMod exception where Language phrase "7" was not found during vote result announcements. The issue occurred when trying to format chat messages with incorrect parameter counts for translation phrases.

Key changes:

  • Initialize player variable to prevent undefined behavior
  • Split chat message output to separate general voting results from nominator information

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
addons/sourcemod/scripting/mce/menus.inc Fixed vote result message formatting by initializing sPlayer variable and separating chat output logic
addons/sourcemod/scripting/include/mapchooser_extended.inc Version bump from 1.13.9 to 1.13.10

Comment on lines +423 to 430
CPrintToChatAll("{green}[MCE]{default} %t", "Nextmap Voting Finished", map, percent, num_votes);
if (g_bShowNominator)
{
CPrintToChatAll("{green}[MCE]{default} %t - %t %s", "Nextmap Voting Finished", map, percent, num_votes, "Nominated by", sPlayer);
CPrintToChatAll("{green}[MCE]{default} %t %s", "Nominated by", sPlayer);
LogAction(-1, -1, "[MCE] Voting for next map has finished. \nNextmap: %s. (Received \"%d\"\%% of %d votes) Nominated by %s", map, percent, num_votes, sPlayer);
}
else
{
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The chat messages are now split into two separate calls, which may cause them to appear as disconnected messages in chat. Consider combining them into a single message with conditional formatting to maintain message cohesion.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant