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

Method LoadConfiguration

extensions/topmenus/TopMenu.cpp:1064–1087  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1062}
1063
1064bool TopMenu::LoadConfiguration(const char *file, char *error, size_t maxlength)
1065{
1066 SMCError err;
1067 SMCStates states;
1068
1069 if ((err = textparsers->ParseFile_SMC(file, this, &states))
1070 != SMCError_Okay)
1071 {
1072 const char *err_string = textparsers->GetSMCErrorString(err);
1073 if (!err_string)
1074 {
1075 err_string = "Unknown";
1076 }
1077
1078 UTIL_Format(error, maxlength, "%s", err_string);
1079
1080 return false;
1081 }
1082
1083 m_SerialNo++;
1084 m_bCatsNeedResort = true;
1085
1086 return true;
1087}
1088
1089bool TopMenu::OnIdentityRemoval(IdentityToken_t *owner)
1090{

Callers 1

LoadTopMenuConfigFunction · 0.80

Calls 3

UTIL_FormatFunction · 0.70
ParseFile_SMCMethod · 0.45
GetSMCErrorStringMethod · 0.45

Tested by

no test coverage detected