diff --git a/Source/Core/Compilers/AccCompiler.cs b/Source/Core/Compilers/AccCompiler.cs
index 57a84e12044e30985b8d63a3e4d08073d7e9bba0..fd6ac0ede404f1ad7b7f5c66f06d3ab0095cacb9 100644
--- a/Source/Core/Compilers/AccCompiler.cs
+++ b/Source/Core/Compilers/AccCompiler.cs
@@ -85,12 +85,13 @@ namespace CodeImp.DoomBuilder.Compilers
 			// Preprocess the file
 			parser = new AcsParserSE
 			{
+				IsMapScriptsLump = SourceIsMapScriptsLump,
 				OnInclude = delegate(AcsParserSE se, string includefile, AcsParserSE.IncludeType includetype)
 				{
 					TextResourceData data = General.Map.Data.GetTextResourceData(includefile);
 					if(data == null)
 					{
-						se.ReportError("Unable to find include file \"" + includefile + "\"");
+						se.ReportError("Unable to find include file \"" + includefile + "\".");
 						return false; // Fial
 					}
 
@@ -105,7 +106,8 @@ namespace CodeImp.DoomBuilder.Compilers
 				if(SourceIsMapScriptsLump && stream.Length == 0) return false;
 
 				DataLocation dl = new DataLocation(DataLocation.RESOURCE_DIRECTORY, Path.GetDirectoryName(inputfilepath), false, false, false);
-				TextResourceData data = new TextResourceData(stream, dl, inputfile, false);
+				//mxd. TextResourceData must point to temp path when compiling WAD lumps for lump to be recognized as map lump when reporting errors...
+				TextResourceData data = new TextResourceData(stream, dl, (SourceIsMapScriptsLump ? inputfile : sourcefile), false);
 				if(!parser.Parse(data, info.Files, true, AcsParserSE.IncludeType.NONE, false))
 				{
 					// Check for errors
@@ -117,14 +119,7 @@ namespace CodeImp.DoomBuilder.Compilers
 			//mxd. External lumps should be libraries
 			if(!SourceIsMapScriptsLump && !parser.IsLibrary)
 			{
-				ReportError(new CompilerError("External ACS files can only be compiled as libraries!", sourcefile));
-				return true;
-			}
-
-			//mxd. SCRIPTS lump can't be library
-			if(SourceIsMapScriptsLump && parser.IsLibrary)
-			{
-				ReportError(new CompilerError("SCRIPTS lump can't be compiled as library!", sourcefile));
+				ReportError(new CompilerError("External ACS files can only be compiled as libraries.", sourcefile));
 				return true;
 			}
 
@@ -215,6 +210,7 @@ namespace CodeImp.DoomBuilder.Compilers
 					// Read all lines
 					bool erroradded = false; //mxd
 					string[] errlines = File.ReadAllLines(errfile);
+					string temppath = this.tempdir.FullName + Path.DirectorySeparatorChar.ToString(); //mxd. Need trailing slash..
 					while(line < errlines.Length)
 					{
 						// Check line
@@ -235,7 +231,7 @@ namespace CodeImp.DoomBuilder.Compilers
 							err.filename = linestr.Substring(0, match.Index).Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
 
 							//mxd. Get rid of temp directory path
-							if(err.filename.StartsWith(this.tempdir.Name)) err.filename = err.filename.Replace(this.tempdir.Name, string.Empty);
+							if(err.filename.StartsWith(temppath)) err.filename = err.filename.Replace(temppath, string.Empty);
 							
 							if(!Path.IsPathRooted(err.filename))
 							{
diff --git a/Source/Core/ZDoom/Scripting/AcsParserSE.cs b/Source/Core/ZDoom/Scripting/AcsParserSE.cs
index 8a807f0ed6b9ad28e7f5c4df10cefad60cece5cb..1ee8ae5b1a137499b321807e7fd894f315ced710 100644
--- a/Source/Core/ZDoom/Scripting/AcsParserSE.cs
+++ b/Source/Core/ZDoom/Scripting/AcsParserSE.cs
@@ -217,7 +217,7 @@ namespace CodeImp.DoomBuilder.ZDoom.Scripting
 					case "#library":
 						if(IsMapScriptsLump)
 						{
-							if(!IgnoreErrors) ReportError("SCRIPTS lump can not be compiled as a library");
+							if(!IgnoreErrors) ReportError("SCRIPTS lump can't be compiled as library.");
 							return IgnoreErrors;
 						}
 						
@@ -226,7 +226,7 @@ namespace CodeImp.DoomBuilder.ZDoom.Scripting
 
 						if(!libname.StartsWith("\"") || !libname.EndsWith("\""))
 						{
-							if(!IgnoreErrors) ReportError("#library name should be quoted");
+							if(!IgnoreErrors) ReportError("#library name should be quoted.");
 							return IgnoreErrors;
 						}
 
@@ -234,7 +234,7 @@ namespace CodeImp.DoomBuilder.ZDoom.Scripting
 
 						if(string.IsNullOrEmpty(libname))
 						{
-							if(!IgnoreErrors) ReportError("Expected library name");
+							if(!IgnoreErrors) ReportError("Expected library name.");
 							return IgnoreErrors;
 						}
 
@@ -260,7 +260,7 @@ namespace CodeImp.DoomBuilder.ZDoom.Scripting
 
 							if(!includelump.StartsWith("\"") || !includelump.EndsWith("\""))
 							{
-								if(!IgnoreErrors) ReportError(token + " filename should be quoted");
+								if(!IgnoreErrors) ReportError(token + " filename should be quoted.");
 								return IgnoreErrors;
 							}
 
@@ -268,7 +268,7 @@ namespace CodeImp.DoomBuilder.ZDoom.Scripting
 
 							if(string.IsNullOrEmpty(includelump))
 							{
-								if(!IgnoreErrors) ReportError("Expected file name to " + token);
+								if(!IgnoreErrors) ReportError("Expected file name to " + token + ".");
 								return IgnoreErrors;
 							}
 
@@ -280,7 +280,7 @@ namespace CodeImp.DoomBuilder.ZDoom.Scripting
 								// These can also be included several times...
 								if(includes[includecategory].Contains(includelump))
 								{
-									if(!IgnoreErrors) ReportError("Already parsed \"" + includelump + "\". Check your " + token + " directives");
+									if(!IgnoreErrors) ReportError("Already parsed \"" + includelump + "\". Check your " + token + " directives.");
 									return IgnoreErrors;
 								}
 
@@ -299,7 +299,7 @@ namespace CodeImp.DoomBuilder.ZDoom.Scripting
 							// Already parsed?
 							if(includes[includecategory].Contains(includelumppath))
 							{
-								if(!IgnoreErrors) ReportError("Already parsed \"" + includelump + "\". Check your " + token + " directives");
+								if(!IgnoreErrors) ReportError("Already parsed \"" + includelump + "\". Check your " + token + " directives.");
 								return IgnoreErrors;
 							}