mirror of
https://github.com/opensim/opensim.git
synced 2026-08-02 23:18:34 +08:00
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.)
This commit is contained in:
@@ -4127,10 +4127,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
}
|
||||
// destination is an avatar
|
||||
InventoryItemBase agentItem = World.MoveTaskInventoryItem(destId, UUID.Zero, m_host, objId);
|
||||
string message;
|
||||
InventoryItemBase agentItem = World.MoveTaskInventoryItem(destId, UUID.Zero, m_host, objId, out message);
|
||||
|
||||
if (agentItem == null)
|
||||
{
|
||||
llSay(0, message);
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_TransferModule != null)
|
||||
{
|
||||
|
||||
@@ -3397,14 +3397,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (sp == null)
|
||||
return;
|
||||
|
||||
InventoryItemBase newItem = World.MoveTaskInventoryItem(sp.UUID, UUID.Zero, m_host, item.ItemID);
|
||||
string message;
|
||||
InventoryItemBase newItem = World.MoveTaskInventoryItem(sp.UUID, UUID.Zero, m_host, item.ItemID, out message);
|
||||
|
||||
if (newItem == null)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[OSSL API]: Could not create user inventory item {0} for {1}, attach point {2} in {3}",
|
||||
itemName, m_host.Name, attachmentPoint, World.Name);
|
||||
|
||||
"[OSSL API]: Could not create user inventory item {0} for {1}, attach point {2} in {3}: {4}",
|
||||
itemName, m_host.Name, attachmentPoint, World.Name, message);
|
||||
((LSL_Api)m_LSL_Api).llSay(0, message);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user