mirror of
https://github.com/alterware/iw4-validator.git
synced 2025-12-02 07:37:49 +00:00
feat: print warning for invalid gametypes
This commit is contained in:
10
src/main.cpp
10
src/main.cpp
@@ -21,12 +21,12 @@ namespace
|
||||
std::string data;
|
||||
if (!utils::io::read_file(filename, &data) || data.empty())
|
||||
{
|
||||
throw std::runtime_error(utils::string::va("'%s' is empty", filename.data()));
|
||||
throw std::runtime_error(utils::string::va("'%s' is empty", filename.c_str()));
|
||||
}
|
||||
|
||||
if (game::parse_client_effects(data.data()))
|
||||
{
|
||||
console::info("Successfully parsed '%s'\n", filename.data());
|
||||
console::info("Successfully parsed '%s'\n", filename.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,9 +41,11 @@ namespace
|
||||
std::string data;
|
||||
if (!utils::io::read_file(filename, &data) || data.empty())
|
||||
{
|
||||
throw std::runtime_error(utils::string::va("'%s' is empty", filename.data()));
|
||||
throw std::runtime_error(utils::string::va("'%s' is empty", filename.c_str()));
|
||||
}
|
||||
|
||||
console::info("Please ensure that the map rotation is in all lowercase\n");
|
||||
|
||||
try
|
||||
{
|
||||
map_rotation::rotation_data rotation_data;
|
||||
@@ -53,7 +55,7 @@ namespace
|
||||
}
|
||||
catch (const std::exception& ex)
|
||||
{
|
||||
console::error(utils::string::va("%s. '%s' contains invalid data!\n", ex.what(), filename.data()));
|
||||
console::error(utils::string::va("%s. '%s' contains invalid data!\n", ex.what(), filename.c_str()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user