MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / FormatString

Method FormatString

core/logic/Translator.cpp:1066–1093  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1064}
1065
1066bool Translator::FormatString(char *buffer,
1067 size_t maxlength,
1068 const char *format,
1069 IPhraseCollection *pPhrases,
1070 void **params,
1071 unsigned int numparams,
1072 size_t *pOutLength,
1073 const char **pFailPhrase)
1074{
1075 unsigned int arg;
1076
1077 arg = 0;
1078 if (!gnprintf(buffer, maxlength, format, pPhrases, params, numparams, arg, pOutLength, pFailPhrase))
1079 {
1080 return false;
1081 }
1082
1083 if (arg != numparams)
1084 {
1085 if (pFailPhrase != NULL)
1086 {
1087 *pFailPhrase = NULL;
1088 }
1089 return false;
1090 }
1091
1092 return true;
1093}

Callers 15

CoreTranslateFunction · 0.45
sm_LogToGameFunction · 0.45
sm_LogMessageFunction · 0.45
sm_LogErrorFunction · 0.45
sm_LogToOpenFileFunction · 0.45
sm_LogToOpenFileExFunction · 0.45
SetMenuTitleFunction · 0.45
ThrowNativeErrorFunction · 0.45
ThrowErrorFunction · 0.45
SetFailStateFunction · 0.45
sm_LogActionFunction · 0.45
LogToFileFunction · 0.45

Calls 1

gnprintfFunction · 0.85

Tested by

no test coverage detected