Difference between revisions of "Experience permissions denied"

From Second Life Wiki
Jump to: navigation, search
(Created page with "Category:Experience Tools {{LSL_Event |event=experience_permissions_denied |event_desc=The agent has denied experience permission. |event_f…")
 
m
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:Experience Tools]]
 
[[Category:Experience Tools]]
 
{{LSL_Event
 
{{LSL_Event
 +
|inject-2={{LSL_Function/avatar|agent_id}}
 
|event=experience_permissions_denied
 
|event=experience_permissions_denied
 +
|p1_type=key|p1_name=agent_id|p1_desc= that denied permission.
 +
|p2_type=integer|p2_subtype=experience_error|p2_name=reason
 +
|p2_desc=Reason for denial; one of the [[Experience Tools]] <code>[[Template:LSL Constants/Experience Tools Errors|XP_ERROR_*]]</code> errors flags.
 +
|p2_hover=Reason for denial; one of the experience tools XP_ERROR_* errors flags.
 
|event_desc=The agent has denied [[llRequestExperiencePermissions|experience permission]].
 
|event_desc=The agent has denied [[llRequestExperiencePermissions|experience permission]].
 
|event_footnote=This event may be generated in many cases:
 
|event_footnote=This event may be generated in many cases:
Line 12: Line 17:
 
* The experience can no longer run:
 
* The experience can no longer run:
 
** The script has moved to a region where the experience cannot run because it is blocked or it exceeds the maturity rating of the region.
 
** The script has moved to a region where the experience cannot run because it is blocked or it exceeds the maturity rating of the region.
 +
** The script has moved to a parcel where it is blocked or not allowed.
 
** The agent has blocked the experience from the experience profile.
 
** The agent has blocked the experience from the experience profile.
|p1_type=key|p1_name=agent_id|p1_desc=Key of the agent denying permission.
+
|constants={{LSL Constants/Experience Tools Errors}}
|p2_type=integer|p2_name=reason|p2_desc=Reasonfor denial; one of the [[experience tools errors]].
+
 
|also_events=[[experience permissions]]
 
|also_events=[[experience permissions]]
|also_functions=[[llRequestExperiencePermissions]]
+
|also_functions=
|examples=<lsl>// Simple experience watcher
+
*[[llRequestExperiencePermissions]]
 +
*[[llGetExperienceErrorMessage]]
 +
|examples=<source lang="lsl2">// Simple experience watcher
 
string denied_region = "";
 
string denied_region = "";
 
string experience_name = "";
 
string experience_name = "";
Line 43: Line 50:
 
         }
 
         }
 
     }  
 
     }  
}</lsl>
+
}</source>
 +
|cat1=Experience
 +
|cat2=Permissions/Experience
 
}}
 
}}

Latest revision as of 15:37, 10 July 2020

Description

Event: experience_permissions_denied( key agent_id, integer reason ){ ; }

The agent has denied experience permission.

• key agent_id avatar UUID that denied permission.
• integer reason Reason for denial; one of the Experience Tools XP_ERROR_* errors flags.

This event may be generated in many cases:

  • In response to a call to llRequestExperiencePermissions if any of the following is true:
    • The agent does not respond to the experience permission dialog. This will happen after a long delay if the agent is running a viewer which doesn't understand the request or if the agent has blocked the object.
    • The agent selects "Block Experience" in the experience permission dialog.
    • The agent has previously blocked the experience through another experience permission dialog or through the experience profile.
    • An attachment is asking for permission from an agent other than its owner.
    • The experience cannot run on the region because it is blocked or exceeds the maturity rating of the region.
  • The experience can no longer run:
    • The script has moved to a region where the experience cannot run because it is blocked or it exceeds the maturity rating of the region.
    • The script has moved to a parcel where it is blocked or not allowed.
    • The agent has blocked the experience from the experience profile.
LSL Constant Message returned via llGetExperienceErrorMessage Description
XP_ERROR_NONE 0 no error No error was detected.
XP_ERROR_THROTTLED 1 exceeded throttle The call failed due to too many recent calls.
XP_ERROR_EXPERIENCES_DISABLED 2 experiences are disabled The region currently has experiences disabled.
XP_ERROR_INVALID_PARAMETERS 3 invalid parameters One of the string arguments was too big to fit in the key-value store.
XP_ERROR_NOT_PERMITTED 4 operation not permitted Experience permissions were denied by the user.
XP_ERROR_NO_EXPERIENCE 5 script not associated with an experience This script is not associated with an experience.
XP_ERROR_NOT_FOUND 6 not found The sim was unable to verify the validity of the experience. Retrying after a short wait is advised.
XP_ERROR_INVALID_EXPERIENCE 7 invalid experience The script is associated with an experience that no longer exists.
XP_ERROR_EXPERIENCE_DISABLED 8 experience is disabled The experience owner has temporarily disabled the experience.
XP_ERROR_EXPERIENCE_SUSPENDED 9 experience is suspended The experience has been suspended by Linden Lab customer support.
XP_ERROR_UNKNOWN_ERROR 10 unknown error An unknown error not covered by any of the other predetermined error states.
XP_ERROR_QUOTA_EXCEEDED 11 experience data quota exceeded An attempt to write data to the key-value store failed due to the data quota being met.
XP_ERROR_STORE_DISABLED 12 key-value store is disabled They key-value store is currently disabled on this region.
XP_ERROR_STORAGE_EXCEPTION 13 key-value store communication failed Unable to communicate with the key-value store.
XP_ERROR_KEY_NOT_FOUND 14 key doesn't exist They requested key does not exist.
XP_ERROR_RETRY_UPDATE 15 retry update A checked update failed due to an out of date request.
XP_ERROR_MATURITY_EXCEEDED 16 experience content rating too high The content rating of the experience exceeds that of the region.
XP_ERROR_NOT_PERMITTED_LAND 17 not allowed to run on this land The experience is blocked or not enabled for this land.
XP_ERROR_REQUEST_PERM_TIMEOUT 18 experience permissions request timed out The request for experience permissions was ignored.

Examples

// Simple experience watcher
string denied_region = "";
string experience_name = "";
 
default{
    state_entry(){
        llRequestExperiencePermissions(llGetOwner(), "");
        experience_name = llList2String(llGetExperienceDetails(NULL_KEY), 0);
    }
 
    experience_permissions(key agent){
        denied_region="";
        llOwnerSay("in "+ experience_name);
    }
 
    experience_permissions_denied(key agent, integer reason){
        denied_region = llGetRegionName( );
        llOwnerSay("out "+ experience_name);
 
    }
 
    changed(integer what){
        if(denied_region != "" && denied_region != llGetRegionName()){
           llRequestExperiencePermissions(llGetOwner(), "");
        }
    } 
}

Deep Notes

Signature

event void experience_permissions_denied( key agent_id, integer reason );