diff options
author | Melanie | 2012-08-18 13:17:39 +0100 |
---|---|---|
committer | Melanie | 2012-08-18 13:17:39 +0100 |
commit | aee7a31bc3b5348c883e0d750bab991d853db642 (patch) | |
tree | 9d38c2ec7cc62019ab3ea95a3716d28e1451c397 /OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-aee7a31bc3b5348c883e0d750bab991d853db642.zip opensim-SC_OLD-aee7a31bc3b5348c883e0d750bab991d853db642.tar.gz opensim-SC_OLD-aee7a31bc3b5348c883e0d750bab991d853db642.tar.bz2 opensim-SC_OLD-aee7a31bc3b5348c883e0d750bab991d853db642.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/Framework/Scenes/Scene.cs
OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index 8adf4c5..46772ef 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | |||
@@ -562,12 +562,23 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
562 | else if (m_data[itemIndex] is LSL_Types.LSLString) | 562 | else if (m_data[itemIndex] is LSL_Types.LSLString) |
563 | return new LSLInteger(m_data[itemIndex].ToString()); | 563 | return new LSLInteger(m_data[itemIndex].ToString()); |
564 | else | 564 | else |
565 | throw new InvalidCastException(); | 565 | throw new InvalidCastException(string.Format( |
566 | "{0} expected but {1} given", | ||
567 | typeof(LSL_Types.LSLInteger).Name, | ||
568 | m_data[itemIndex] != null ? | ||
569 | m_data[itemIndex].GetType().Name : "null")); | ||
566 | } | 570 | } |
567 | 571 | ||
568 | public LSL_Types.Vector3 GetVector3Item(int itemIndex) | 572 | public LSL_Types.Vector3 GetVector3Item(int itemIndex) |
569 | { | 573 | { |
570 | return (LSL_Types.Vector3)m_data[itemIndex]; | 574 | if(m_data[itemIndex] is LSL_Types.Vector3) |
575 | return (LSL_Types.Vector3)m_data[itemIndex]; | ||
576 | else | ||
577 | throw new InvalidCastException(string.Format( | ||
578 | "{0} expected but {1} given", | ||
579 | typeof(LSL_Types.Vector3).Name, | ||
580 | m_data[itemIndex] != null ? | ||
581 | m_data[itemIndex].GetType().Name : "null")); | ||
571 | } | 582 | } |
572 | 583 | ||
573 | public LSL_Types.Quaternion GetQuaternionItem(int itemIndex) | 584 | public LSL_Types.Quaternion GetQuaternionItem(int itemIndex) |