<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN">
	<id>http://i.bnu.edu.cn/wiki/index.php?action=history&amp;feed=atom&amp;title=LlRemoveInventory</id>
	<title>LlRemoveInventory - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="http://i.bnu.edu.cn/wiki/index.php?action=history&amp;feed=atom&amp;title=LlRemoveInventory"/>
	<link rel="alternate" type="text/html" href="http://i.bnu.edu.cn/wiki/index.php?title=LlRemoveInventory&amp;action=history"/>
	<updated>2026-06-01T05:32:35Z</updated>
	<subtitle>本wiki的该页面的版本历史</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>http://i.bnu.edu.cn/wiki/index.php?title=LlRemoveInventory&amp;diff=501&amp;oldid=prev</id>
		<title>Mkx：创建页面，内容为“{{LSL Header|ml=*}}{{LSLC|Keywords}}{{LSLC|Flow Control}}{{LSLC|}}   {{函数详情 |函数名 = Function: llRemoveInventory( string item ); |参数= 参数：string…”</title>
		<link rel="alternate" type="text/html" href="http://i.bnu.edu.cn/wiki/index.php?title=LlRemoveInventory&amp;diff=501&amp;oldid=prev"/>
		<updated>2020-07-19T03:09:04Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“{{LSL Header|ml=*}}{{LSLC|Keywords}}{{LSLC|Flow Control}}{{LSLC|}}   {{函数详情 |函数名 = Function: llRemoveInventory( string item ); |参数= 参数：string…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LSL Header|ml=*}}{{LSLC|Keywords}}{{LSLC|Flow Control}}{{LSLC|}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{函数详情&lt;br /&gt;
|函数名 = Function: llRemoveInventory( string item );&lt;br /&gt;
|参数= 参数：string item – 此脚本所在的prim目录中的项目 &lt;br /&gt;
|返回值= 返回值：删除已命名的库存项&lt;br /&gt;
&lt;br /&gt;
|注意事项=如果物品从prim的库存中丢失，那么[[DEBUG_CHANNEL]]将显示一个错误。&lt;br /&gt;
&lt;br /&gt;
如果当前脚本被删除，它将在此调用后继续运行一小段时间。&lt;br /&gt;
&lt;br /&gt;
多次执行llRemoveInventory之后的llSleep(0.1)将允许编辑窗口内容正确刷新，并避免phantom内容上的错误。&lt;br /&gt;
&lt;br /&gt;
llRemoveInventory不会触发一个已更改的事件。&lt;br /&gt;
&lt;br /&gt;
|示例=&lt;br /&gt;
示例1&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// 从对象中删除当前脚本&lt;br /&gt;
 &lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// 要包含在脚本中的用户函数&lt;br /&gt;
// 删除除脚本本身之外的所有其他类型的内容&lt;br /&gt;
delete_all_other_contents()&lt;br /&gt;
{&lt;br /&gt;
    string thisScript = llGetScriptName();&lt;br /&gt;
    string inventoryItemName;&lt;br /&gt;
 &lt;br /&gt;
    integer index = llGetInventoryNumber(INVENTORY_ALL);&lt;br /&gt;
    while (index)&lt;br /&gt;
    {&lt;br /&gt;
        --index;        // (faster than index--;)&lt;br /&gt;
 &lt;br /&gt;
        inventoryItemName = llGetInventoryName(INVENTORY_ALL, index);&lt;br /&gt;
 &lt;br /&gt;
        if (inventoryItemName != thisScript)   &lt;br /&gt;
            llRemoveInventory(inventoryItemName);     &lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        delete_all_other_contents();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Mkx</name></author>
		
	</entry>
</feed>