aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/XEngine.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 75d0bec..40a6dd1 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -516,6 +516,38 @@ namespace OpenSim.Region.ScriptEngine.XEngine
516 m_AddingAssemblies[assembly]++; 516 m_AddingAssemblies[assembly]++;
517 } 517 }
518 } 518 }
519
520 string[] warnings = m_Compiler.GetWarnings();
521
522 if (warnings != null && warnings.Length != 0)
523 {
524 if (presence != null && (!postOnRez))
525 presence.ControllingClient.SendAgentAlertMessage("Script saved with warnings, check debug window!", false);
526
527 foreach (string warning in warnings)
528 {
529 try
530 {
531 // DISPLAY WARNING INWORLD
532 string text = "Warning:\n" + warning;
533 if (text.Length > 1000)
534 text = text.Substring(0, 1000);
535 World.SimChat(Utils.StringToBytes(text),
536 ChatTypeEnum.DebugChannel, 2147483647,
537 part.AbsolutePosition,
538 part.Name, part.UUID, false);
539 }
540 catch (Exception e2) // LEGIT: User Scripting
541 {
542 m_log.Error("[XEngine]: " +
543 "Error displaying warning in-world: " +
544 e2.ToString());
545 m_log.Error("[XEngine]: " +
546 "Warning:\r\n" +
547 warning);
548 }
549 }
550 }
519 } 551 }
520 catch (Exception e) 552 catch (Exception e)
521 { 553 {