Difference between revisions of "LlDeleteKeyValue/ja"

From Second Life Wiki
Jump to navigation Jump to search
m
m
 
Line 2: Line 2:
{{LSL_Function/ja
{{LSL_Function/ja
|inject-2=
|inject-2=
{{LSL Function/KeyValue|k|value=value|d2_type=string|d2_name=value}}
{{LSL Function/KeyValue/ja|k|value=value|d2_type=string|d2_name=value}}
{{LSL Function/Experience|true}}
{{LSL Function/Experience/ja|true}}
|func=llDeleteKeyValue
|func=llDeleteKeyValue
|func_desc=Start an asynchronous transaction to delete a key-value pair associated with the script's {{LSLGC|Experience}} with the given key ({{LSLPT|k}}).
|func_desc=指定されたキー({{LSLPT|k}})でスクリプトの{{LSLGC|Experience}}に関連付けられたキーと値のペアを削除するための非同期トランザクションを開始します。
|func_footnote=If the key does not exist the [[dataserver/ja]] will return a failure along with the error [[XP_ERROR_STORAGE_EXCEPTION]].
|func_footnote=キーが存在しない場合、[[dataserver/ja]]はエラー[[XP_ERROR_STORAGE_EXCEPTION]]とともに失敗を返します。
|return_type=key|return_subtype=handle
|return_type=key|return_subtype=handle
|return_text=that can be used to identify the corresponding [[dataserver/ja]] event to determine if this command succeeded or failed and the results.
|return_text=これを使用して、このコマンドが成功したか失敗したか、およびその結果を判断するための対応する[[dataserver/ja]]イベントを識別できます。
|p1_type=string|p1_name=k|p1_desc=The key for the key-value pair
|p1_type=string|p1_name=k|p1_desc=キー・バリュー・ペアのキー
|also_functions=
|also_functions=
*[[llGetExperienceErrorMessage/ja]]
*[[llGetExperienceErrorMessage/ja]]

Latest revision as of 14:04, 22 November 2023

要約

関数: key llDeleteKeyValue( string k );

指定されたキー(k)でスクリプトのExperienceに関連付けられたキーと値のペアを削除するための非同期トランザクションを開始します。
これを使用して、このコマンドが成功したか失敗したか、およびその結果を判断するための対応するdataserver/jaイベントを識別できます。を key で返します。

• string k The key for the key-value pairキー・バリュー・ペアのキー

キーが存在しない場合、dataserver/jaはエラーXP_ERROR_STORAGE_EXCEPTIONとともに失敗を返します。

仕様

Dataserver

dataserverコールバックのパラメータは次のとおりです:

文字列のコンポーネント
• integer success トランザクションが成功した場合は1、失敗した場合は0を指定するブール値。
• integer error 操作が失敗した理由を説明するXP_ERROR_*フラグ。
• string value The value for the key-value pair. Maximum 2047 characters, or 4095 if using Mono. 注意!この値にはカンマが含まれている可能性があります。

警告

  • 以前に体験に関連付けられていたスクリプトを体験のコンパイル機能を持たないクライアントで再コンパイルすると、スクリプトは関連する体験を失います。
All Issues ~ Search JIRA for related Bugs

サンプル

key trans;
default
{
    state_entry()
    {
        trans = llDeleteKeyValue("FOO");
    }

    dataserver(key t, string value)
    {
        if (t == trans)
        {
            // our llDeleteKeyValue transaction is done
            list result = llCSV2List(value);
            if (llList2Integer(result, 0) == 1)
            {
                // the key-value pair was successfully deleted
                llSay(0, "New key-value pair was deleted");
            }
            else
            {
                // the key-value pair was not deleted
                llSay(0, "Key-value failed to delete: " + llList2String(result, 1) );
            }
        } 
    }
}

注意点

コンパイル

スクリプトが Experience に関連するようにするには...

  • 体験をサポートしたクライアントでコンパイルされている必要があります
  • "体験を使用" チェックボックスをチェックする
  • 体験キーの一つを選択する
KBcaution.png 重要 すべての TPV にこの機能があるわけではありません。

特記事項

Search JIRA for related Issues

Signature

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