Difference between revisions of "LlClearPrimMedia/ja"

From Second Life Wiki
Jump to navigation Jump to search
m (server 1.33 is already released)
(サンプル追加)
Line 9: Line 9:
|caveats
|caveats
|constants={{LSL Constants/ReturnStatus/ja|table=*|sortable=*}}
|constants={{LSL Constants/ReturnStatus/ja|table=*|sortable=*}}
|examples
|examples=
<lsl>
//  when dropping this script into a prim
//  it will remove all set media-on-a-prim
//  on all sides of the prim containing the script
//  and then the script will delete itself
 
 
 
publish_returned_status_flag(integer inputLink, integer inputFace, integer inputStatus)
{
    /* if (inputInteger == 0) */ string outputStatus = "STATUS_OK";
    if (inputStatus == 1000) outputStatus = "STATUS_MALFORMED_PARAMS";
    else if (inputStatus == 1001) outputStatus = "STATUS_TYPE_MISMATCH";
    else if (inputStatus == 1002) outputStatus = "STATUS_BOUNDS_ERROR";
    else if (inputStatus == 1003) outputStatus = "STATUS_NOT_FOUND";
    else if (inputStatus == 1004) outputStatus = "STATUS_NOT_SUPPORTED";
    else if (inputStatus == 1999) outputStatus = "STATUS_INTERNAL_ERROR";
    else if (inputStatus == 2001) outputStatus = "STATUS_WHITELIST_FAILED";
 
    // PUBLIC_CHANNEL has the integer value 0
    llSay(PUBLIC_CHANNEL, "llClearLinkMedia(link " + (string)inputLink
        + ", face " + (string)inputFace + ") = " + outputStatus + ";");
}
 
default
{
    state_entry()
    {
        integer link = llGetLinkNumber();
        integer numOfSides = llGetLinkNumberOfSides(link);
        integer face;
 
        do
        {
            integer clearMediaSucceeded = llClearPrimMedia(face);
            publish_returned_status_flag(link, face, clearMediaSucceeded);
 
            ++face;
        }
        while (face < numOfSides);
 
        string thisScript = llGetScriptName();
        llRemoveInventory(thisScript);
    }
}
</lsl>
|helpers
|helpers
|also_functions=
|also_functions=

Revision as of 17:39, 22 February 2013

要約

関数: integer llClearPrimMedia( integer face );

指定された のメディアと全ての パラメタ をクリア (消去) します。
操作の成功失敗を表す STATUS_* フラグを integer で返します。

• integer face 番号

成功失敗フラグ 説明
LSL_STATUS_OK 0 関数呼び出しに成功しました
LSL_STATUS_MALFORMED_PARAMS 1000 不正な形式のパラメタ呼び出しです
LSL_STATUS_TYPE_MISMATCH 1001 引数の型が一致しません
LSL_STATUS_BOUNDS_ERROR 1002 引数の数が一致しません
LSL_STATUS_NOT_FOUND 1003 オブジェクトまたはアイテムが見つかりませんでした
LSL_STATUS_NOT_SUPPORTED 1004 この機能はサポートされていません
LSL_STATUS_INTERNAL_ERROR 1999 内部エラーが発生しました
LSL_STATUS_WHITELIST_FAILED 2001 ブロックされました

警告

  • この関数は 1.0 秒間、スクリプトを停止します。
  • face が存在しない面を指している場合、関数はエラーを出さずに復帰します。
All Issues ~ Search JIRA for related Bugs

サンプル

<lsl> // when dropping this script into a prim // it will remove all set media-on-a-prim // on all sides of the prim containing the script // and then the script will delete itself


publish_returned_status_flag(integer inputLink, integer inputFace, integer inputStatus) {

   /* if (inputInteger == 0) */ string outputStatus = "STATUS_OK";
   if (inputStatus == 1000) outputStatus = "STATUS_MALFORMED_PARAMS";
   else if (inputStatus == 1001) outputStatus = "STATUS_TYPE_MISMATCH";
   else if (inputStatus == 1002) outputStatus = "STATUS_BOUNDS_ERROR";
   else if (inputStatus == 1003) outputStatus = "STATUS_NOT_FOUND";
   else if (inputStatus == 1004) outputStatus = "STATUS_NOT_SUPPORTED";
   else if (inputStatus == 1999) outputStatus = "STATUS_INTERNAL_ERROR";
   else if (inputStatus == 2001) outputStatus = "STATUS_WHITELIST_FAILED";
   // PUBLIC_CHANNEL has the integer value 0
   llSay(PUBLIC_CHANNEL, "llClearLinkMedia(link " + (string)inputLink
       + ", face " + (string)inputFace + ") = " + outputStatus + ";");

}

default {

   state_entry()
   {
       integer link = llGetLinkNumber();
       integer numOfSides = llGetLinkNumberOfSides(link);
       integer face;
       do
       {
           integer clearMediaSucceeded = llClearPrimMedia(face);
           publish_returned_status_flag(link, face, clearMediaSucceeded);
           ++face;
       }
       while (face < numOfSides);
       string thisScript = llGetScriptName();
       llRemoveInventory(thisScript);
   }

}

</lsl>

関連項目

特記事項

経緯

All Issues

~ Search JIRA for related Issues
   SVN Changeset 2816 in Trunk is immature

Signature

function integer llClearPrimMedia( integer face );
この翻訳は 原文 と比べて古いですか?間違いがありますか?読みにくいですか?みんなで 修正 していきましょう! (手順はこちら)
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。