warn in logfile invalid unlock entries, and remove them from the system when they're found

This commit is contained in:
Andrew Wong
2003-08-11 22:37:46 +00:00
parent 158dbedd25
commit 06eaebb9c5
+13
View File
@@ -345,6 +345,19 @@ void UnlockSystem::UpdateSongs()
m_SongEntries[i].m_pSong = SONGMAN->FindSong( m_SongEntries[i].m_sSongName );
if( m_SongEntries[i].m_pSong == NULL )
m_SongEntries[i].m_pCourse = SONGMAN->FindCourse( m_SongEntries[i].m_sSongName );
// display warning on invalid song entry
if (m_SongEntries[i].m_pSong == NULL &&
m_SongEntries[i].m_pCourse == NULL)
{
LOG->Warn("UnlockSystem::UpdateSongs(): Cannot find a "
"matching entry for %s.\nPlease check the song title. "
"Song titles should include the title and song title, e.g. "
"Can't Stop Fallin' In Love -Speed Mix-.",
m_SongEntries[i].m_sSongName.c_str() );
m_SongEntries.erase(m_SongEntries.begin() + i);
}
}
}