diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs index 9d20c9e..b71afe3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | |||
@@ -662,13 +662,18 @@ namespace SecondLife | |||
662 | { | 662 | { |
663 | string severity = CompErr.IsWarning ? "Warning" : "Error"; | 663 | string severity = CompErr.IsWarning ? "Warning" : "Error"; |
664 | 664 | ||
665 | KeyValuePair<int, int> lslPos; | 665 | KeyValuePair<int, int> errorPos; |
666 | 666 | ||
667 | // Show 5 errors max, but check entire list for errors | 667 | // Show 5 errors max, but check entire list for errors |
668 | 668 | ||
669 | if (severity == "Error") | 669 | if (severity == "Error") |
670 | { | 670 | { |
671 | lslPos = FindErrorPosition(CompErr.Line, CompErr.Column, m_lineMaps[assembly]); | 671 | // C# scripts will not have a linemap since theres no line translation involved. |
672 | if (!m_lineMaps.ContainsKey(assembly)) | ||
673 | errorPos = new KeyValuePair<int, int>(CompErr.Line, CompErr.Column); | ||
674 | else | ||
675 | errorPos = FindErrorPosition(CompErr.Line, CompErr.Column, m_lineMaps[assembly]); | ||
676 | |||
672 | string text = CompErr.ErrorText; | 677 | string text = CompErr.ErrorText; |
673 | 678 | ||
674 | // Use LSL type names | 679 | // Use LSL type names |
@@ -678,7 +683,7 @@ namespace SecondLife | |||
678 | // The Second Life viewer's script editor begins | 683 | // The Second Life viewer's script editor begins |
679 | // countingn lines and columns at 0, so we subtract 1. | 684 | // countingn lines and columns at 0, so we subtract 1. |
680 | errtext += String.Format("({0},{1}): {4} {2}: {3}\n", | 685 | errtext += String.Format("({0},{1}): {4} {2}: {3}\n", |
681 | lslPos.Key - 1, lslPos.Value - 1, | 686 | errorPos.Key - 1, errorPos.Value - 1, |
682 | CompErr.ErrorNumber, text, severity); | 687 | CompErr.ErrorNumber, text, severity); |
683 | hadErrors = true; | 688 | hadErrors = true; |
684 | } | 689 | } |