diff --git a/src/api/main.cpp b/src/api/main.cpp index e8641c50..7b2dff21 100644 --- a/src/api/main.cpp +++ b/src/api/main.cpp @@ -74,6 +74,7 @@ bool loadSettings( int32_t argc, char* argv[] ) if( !m_pConfig->loadConfig( configPath ) ) { g_log.fatal( "Error loading config " + configPath ); + g_log.fatal( "If this is the first time starting the server, we've copied the default one for your editing pleasure." ); return false; } @@ -140,9 +141,11 @@ bool loadSettings( int32_t argc, char* argv[] ) } g_log.info( "Setting up generated EXD data" ); - if( !g_exdDataGen.init( m_pConfig->getValue< std::string >( "GlobalParameters", "DataPath", "" ) ) ) + auto dataPath = m_pConfig->getValue< std::string >( "GlobalParameters", "DataPath", "" ); + if( !g_exdDataGen.init( dataPath ) ) { - g_log.fatal( "Error setting up generated EXD data " ); + g_log.fatal( "Error setting up generated EXD data. Make sure that DataPath is set correctly in config.ini" ); + g_log.fatal( "DataPath: " + dataPath ); return false; } diff --git a/src/common/Config/ConfigMgr.cpp b/src/common/Config/ConfigMgr.cpp index d4c9cddc..b1e975f2 100644 --- a/src/common/Config/ConfigMgr.cpp +++ b/src/common/Config/ConfigMgr.cpp @@ -17,8 +17,8 @@ bool Sapphire::ConfigMgr::loadConfig( const std::string& configName ) if( !fs::exists( configFile ) ) { - if( !copyDefaultConfig( configName ) ) - return false; + copyDefaultConfig( configName ); + return false; } m_pInih = std::unique_ptr< INIReader >( new INIReader( configFile.string() ) ); diff --git a/src/lobby/ServerLobby.cpp b/src/lobby/ServerLobby.cpp index bfaaeb53..e084889a 100644 --- a/src/lobby/ServerLobby.cpp +++ b/src/lobby/ServerLobby.cpp @@ -90,6 +90,7 @@ bool ServerLobby::loadSettings( int32_t argc, char* argv[] ) if( !m_pConfig->loadConfig( m_configPath ) ) { g_log.fatal( "Error loading config " + m_configPath ); + g_log.fatal( "If this is the first time starting the server, we've copied the default one for your editing pleasure." ); return false; } std::vector< std::string > args( argv + 1, argv + argc ); diff --git a/src/world/ServerMgr.cpp b/src/world/ServerMgr.cpp index b1b92588..270e0423 100644 --- a/src/world/ServerMgr.cpp +++ b/src/world/ServerMgr.cpp @@ -69,6 +69,7 @@ bool Sapphire::ServerMgr::loadSettings( int32_t argc, char* argv[] ) if( !pConfig->loadConfig( m_configName ) ) { pLog->fatal( "Error loading config " + m_configName ); + pLog->fatal( "If this is the first time starting the server, we've copied the default one for your editing pleasure." ); return false; } @@ -100,9 +101,11 @@ void Sapphire::ServerMgr::run( int32_t argc, char* argv[] ) pLog->info( "Setting up generated EXD data" ); auto pExdData = std::make_shared< Data::ExdDataGenerated >(); - if( !pExdData->init( pConfig->getValue< std::string >( "GlobalParameters", "DataPath", "" ) ) ) + auto dataPath = pConfig->getValue< std::string >( "GlobalParameters", "DataPath", "" ); + if( !pExdData->init( dataPath ) ) { - pLog->fatal( "Error setting up generated EXD data " ); + pLog->fatal( "Error setting up generated EXD data. Make sure that DataPath is set correctly in config.ini" ); + pLog->fatal( "DataPath: " + dataPath ); return; } g_fw.set< Data::ExdDataGenerated >( pExdData );