Skip to content

Commit

Permalink
FormatEx
Browse files Browse the repository at this point in the history
  • Loading branch information
nickdnk committed Sep 7, 2022
1 parent 619f8c4 commit b9241d9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripting/get5/surrender.sp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ void CheckForSurrenderOnDisconnect() {
surrenderRejoinTime = 30;
}
char surrenderSecondsFormatted[32];
Format(surrenderSecondsFormatted, sizeof(surrenderSecondsFormatted), "{GREEN}%d{NORMAL}", surrenderRejoinTime);
FormatEx(surrenderSecondsFormatted, sizeof(surrenderSecondsFormatted), "{GREEN}%d{NORMAL}", surrenderRejoinTime);
if (surrenderingTeam == Get5Team_None) {
// We end here if people start leaving at the same time; if none of the teams are full and no full team disconnected.
Get5_MessageToAll("%t", "AllPlayersLeftTieCountdown", surrenderSecondsFormatted);
Expand Down
2 changes: 1 addition & 1 deletion scripting/get5/util.sp
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ stock bool ReadEmptyStringInsteadOfPlaceholder(const KeyValues kv, char[] buffer
const int bufferSize) {
kv.GetString(NULL_STRING, buffer, bufferSize);
if (StrEqual(KEYVALUE_STRING_PLACEHOLDER, buffer)) {
Format(buffer, bufferSize, "");
FormatEx(buffer, bufferSize, "");
return true;
}
return false;
Expand Down
2 changes: 1 addition & 1 deletion scripting/get5_mysqlstats.sp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ static void AddPlayerStats(const char[] matchId, const int mapNumber, const KeyV
char teamString[16];
GetTeamString(team, teamString, sizeof(teamString));

// Note that Format() has a 127 argument limit. See SP_MAX_CALL_ARGUMENTS in sourcepawn.
// Note that FormatEx() has a 127 argument limit. See SP_MAX_CALL_ARGUMENTS in sourcepawn.
// At this time we're at around 33, so this should not be a problem in the foreseeable future.
// clang-format off
FormatEx(queryBuffer, sizeof(queryBuffer),
Expand Down

0 comments on commit b9241d9

Please sign in to comment.