aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authorOren Hurvitz2014-05-05 15:59:24 +0300
committerOren Hurvitz2014-05-06 07:28:45 +0100
commiteb79c882eab090ee5ee51cadac7bd1dc2e5ddb9f (patch)
tree22036030b5b13ee158db4dd532d84895f6c04d82 /OpenSim/Region/ScriptEngine/Shared
parentShow more meaningful error messages when failed to give an item to another user (diff)
downloadopensim-SC_OLD-eb79c882eab090ee5ee51cadac7bd1dc2e5ddb9f.zip
opensim-SC_OLD-eb79c882eab090ee5ee51cadac7bd1dc2e5ddb9f.tar.gz
opensim-SC_OLD-eb79c882eab090ee5ee51cadac7bd1dc2e5ddb9f.tar.bz2
opensim-SC_OLD-eb79c882eab090ee5ee51cadac7bd1dc2e5ddb9f.tar.xz
Show more meaningful error messages when failed to move an item from a prim to a user's inventory.
Also, actually show the error to the user in more cases. (Previously, sometimes the operation failed without telling the user anything.)
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs9
2 files changed, 10 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 0e6b24a..d169912 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4127,10 +4127,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4127 } 4127 }
4128 } 4128 }
4129 // destination is an avatar 4129 // destination is an avatar
4130 InventoryItemBase agentItem = World.MoveTaskInventoryItem(destId, UUID.Zero, m_host, objId); 4130 string message;
4131 InventoryItemBase agentItem = World.MoveTaskInventoryItem(destId, UUID.Zero, m_host, objId, out message);
4131 4132
4132 if (agentItem == null) 4133 if (agentItem == null)
4134 {
4135 llSay(0, message);
4133 return; 4136 return;
4137 }
4134 4138
4135 if (m_TransferModule != null) 4139 if (m_TransferModule != null)
4136 { 4140 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 6302455..de2c3f7 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -3397,14 +3397,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3397 if (sp == null) 3397 if (sp == null)
3398 return; 3398 return;
3399 3399
3400 InventoryItemBase newItem = World.MoveTaskInventoryItem(sp.UUID, UUID.Zero, m_host, item.ItemID); 3400 string message;
3401 InventoryItemBase newItem = World.MoveTaskInventoryItem(sp.UUID, UUID.Zero, m_host, item.ItemID, out message);
3401 3402
3402 if (newItem == null) 3403 if (newItem == null)
3403 { 3404 {
3404 m_log.ErrorFormat( 3405 m_log.ErrorFormat(
3405 "[OSSL API]: Could not create user inventory item {0} for {1}, attach point {2} in {3}", 3406 "[OSSL API]: Could not create user inventory item {0} for {1}, attach point {2} in {3}: {4}",
3406 itemName, m_host.Name, attachmentPoint, World.Name); 3407 itemName, m_host.Name, attachmentPoint, World.Name, message);
3407 3408 ((LSL_Api)m_LSL_Api).llSay(0, message);
3408 return; 3409 return;
3409 } 3410 }
3410 3411