aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common
diff options
context:
space:
mode:
authorMike Mazur2008-07-23 08:03:32 +0000
committerMike Mazur2008-07-23 08:03:32 +0000
commit003487631d0715ece515990d6b32b677a122e26b (patch)
tree57fede0ed6b7d47a5e97b7c778e2bd618f7c3dfc /OpenSim/Region/ScriptEngine/Common
parentadding files that were not included in r5589 (diff)
downloadopensim-SC-003487631d0715ece515990d6b32b677a122e26b.zip
opensim-SC-003487631d0715ece515990d6b32b677a122e26b.tar.gz
opensim-SC-003487631d0715ece515990d6b32b677a122e26b.tar.bz2
opensim-SC-003487631d0715ece515990d6b32b677a122e26b.tar.xz
Fix issue 1760. If the inventory item is not found, llSay() and throw an exception.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 68e7425..3129c19 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -2899,6 +2899,12 @@ namespace OpenSim.Region.ScriptEngine.Common
2899 break; 2899 break;
2900 } 2900 }
2901 } 2901 }
2902
2903 if (!found)
2904 {
2905 llSay(0, String.Format("Could not find object '{0}'", inventory));
2906 throw new Exception(String.Format("The inventory object '{0}' could not be found", inventory));
2907 }
2902 2908
2903 // check if destination is an avatar 2909 // check if destination is an avatar
2904 if (World.GetScenePresence(destId) != null) 2910 if (World.GetScenePresence(destId) != null)
@@ -2911,9 +2917,6 @@ namespace OpenSim.Region.ScriptEngine.Common
2911 // destination is an object 2917 // destination is an object
2912 World.MoveTaskInventoryItem(destId, m_host, objId); 2918 World.MoveTaskInventoryItem(destId, m_host, objId);
2913 } 2919 }
2914
2915 if (!found)
2916 llSay(0, "Could not find object " + inventory);
2917 } 2920 }
2918 2921
2919 public void llRemoveInventory(string name) 2922 public void llRemoveInventory(string name)