1.1 --- a/core/GameConfigs.cpp Fri Feb 22 16:51:15 2008 +0000
1.2 +++ b/core/GameConfigs.cpp Fri Feb 22 17:12:24 2008 +0000
1.3 @@ -489,6 +489,7 @@
1.4 bool CGameConfig::Reparse(char *error, size_t maxlength)
1.5 {
1.6 SMCError err;
1.7 + SMCStates state = {0, 0};
1.8
1.9 char path[PLATFORM_MAX_PATH];
1.10 g_SourceMod.BuildPath(Path_SM, path, sizeof(path), "gamedata/%s.txt", m_pFile);
1.11 @@ -508,9 +509,19 @@
1.12 sm_trie_clear(m_pProps);
1.13 sm_trie_clear(m_pKeys);
1.14
1.15 - if ((err=textparsers->ParseSMCFile(path, this, NULL, error, maxlength))
1.16 + if ((err=textparsers->ParseSMCFile(path, this, &state, error, maxlength))
1.17 != SMCError_Okay)
1.18 {
1.19 + const char *msg;
1.20 +
1.21 + msg = textparsers->GetSMCErrorString(err);
1.22 +
1.23 + g_Logger.LogError("[SM] Error parsing gameconfig file \"%s\":", path);
1.24 + g_Logger.LogError("[SM] Error %d on line %d, col %d: %s",
1.25 + err,
1.26 + state.line,
1.27 + state.col,
1.28 + msg ? msg : "Unknown error");
1.29 return false;
1.30 }
1.31