diff --git a/Shared/mods/deathmatch/logic/luadefs/CLuaXMLDefs.cpp b/Shared/mods/deathmatch/logic/luadefs/CLuaXMLDefs.cpp index e08ea10fc78..6e808799a30 100644 --- a/Shared/mods/deathmatch/logic/luadefs/CLuaXMLDefs.cpp +++ b/Shared/mods/deathmatch/logic/luadefs/CLuaXMLDefs.cpp @@ -138,6 +138,7 @@ int CLuaXMLDefs::xmlLoadFile ( lua_State* luaVM ) // Grab our resource CLuaMain* pLuaMain = m_pLuaManager->GetVirtualMachine ( luaVM ); + SString strError = ""; if ( pLuaMain ) { SString strFileInput; @@ -184,6 +185,8 @@ int CLuaXMLDefs::xmlLoadFile ( lua_State* luaVM ) } } + xmlFile->GetLastError ( strError ); + argStream.SetCustomError(strError, SString("Unable to read XML file %s", strFileInput.c_str())); // Destroy it if we failed pLuaMain->DestroyXML ( xmlFile ); }