aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs24
1 files changed, 11 insertions, 13 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
index 6809c09..8f34833 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
@@ -95,13 +95,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
95 95
96 internal void MODError(string msg) 96 internal void MODError(string msg)
97 { 97 {
98 throw new Exception("MOD Runtime Error: " + msg); 98 throw new ScriptException("MOD Runtime Error: " + msg);
99 } 99 }
100 100
101 // 101 /// <summary>
102 //Dumps an error message on the debug console. 102 /// Dumps an error message on the debug console.
103 // 103 /// </summary>
104 104 /// <param name='message'></param>
105 internal void MODShoutError(string message) 105 internal void MODShoutError(string message)
106 { 106 {
107 if (message.Length > 1023) 107 if (message.Length > 1023)
@@ -359,20 +359,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
359 result[i] = (string)(LSL_String)plist[i]; 359 result[i] = (string)(LSL_String)plist[i];
360 else if (plist[i] is LSL_Integer) 360 else if (plist[i] is LSL_Integer)
361 result[i] = (int)(LSL_Integer)plist[i]; 361 result[i] = (int)(LSL_Integer)plist[i];
362 // The int check exists because of the many plain old int script constants in ScriptBase which
363 // are not LSL_Integers.
364 else if (plist[i] is int)
365 result[i] = plist[i];
362 else if (plist[i] is LSL_Float) 366 else if (plist[i] is LSL_Float)
363 result[i] = (float)(LSL_Float)plist[i]; 367 result[i] = (float)(LSL_Float)plist[i];
364 else if (plist[i] is LSL_Key) 368 else if (plist[i] is LSL_Key)
365 result[i] = new UUID((LSL_Key)plist[i]); 369 result[i] = new UUID((LSL_Key)plist[i]);
366 else if (plist[i] is LSL_Rotation) 370 else if (plist[i] is LSL_Rotation)
367 { 371 result[i] = (Quaternion)((LSL_Rotation)plist[i]);
368 result[i] = (OpenMetaverse.Quaternion)(
369 (LSL_Rotation)plist[i]);
370 }
371 else if (plist[i] is LSL_Vector) 372 else if (plist[i] is LSL_Vector)
372 { 373 result[i] = (Vector3)((LSL_Vector)plist[i]);
373 result[i] = (OpenMetaverse.Vector3)(
374 (LSL_Vector)plist[i]);
375 }
376 else 374 else
377 MODError(String.Format("{0}: unknown LSL list element type", fname)); 375 MODError(String.Format("{0}: unknown LSL list element type", fname));
378 } 376 }