Difference between revisions of "TotalControl for LSL/Events/BOT SETUP FAILED"
From SmartBots Developers Docs
m |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
{{API Event Table}} | {{API Event Table}} | ||
{{API Variable Group|''event'' object properties}} | {{API Variable Group|''event'' object properties}} | ||
− | {{API Variable|str}} first line - [[ | + | {{API Variable|str}} first line - [[Usage/Status_Codes|Bot status code]]<br>second life - group expiration date |
{{API Variable|id}} --- | {{API Variable|id}} --- | ||
Line 12: | Line 12: | ||
<syntaxhighlight lang="lsl"> | <syntaxhighlight lang="lsl"> | ||
− | link_message(integer sender,integer | + | link_message(integer sender,integer num, string str, key id) { |
/////////////////// Bot setup failed event | /////////////////// Bot setup failed event | ||
− | if( | + | if(num==BOT_SETUP_FAILED) { |
// We split the string parameter to the lines | // We split the string parameter to the lines | ||
− | list parts=llParseString2List( | + | list parts=llParseString2List(str,["\n"],[]); |
// The first line is a status code, and second line is the bot expiration date | // The first line is a status code, and second line is the bot expiration date |
Latest revision as of 08:44, 26 May 2017
Raised when there was an error setting the bot (Bot does not exist, expired etc)
Reference
This event comes with the following event object:
Variable | Required | Description | |
---|---|---|---|
event object properties: | |||
str | first line - Bot status code second life - group expiration date | ||
id | --- |
Example
link_message(integer sender,integer num, string str, key id) {
/////////////////// Bot setup failed event
if(num==BOT_SETUP_FAILED) {
// We split the string parameter to the lines
list parts=llParseString2List(str,["\n"],[]);
// The first line is a status code, and second line is the bot expiration date
string code=llList2String(parts,0);
string expires=llList2String(parts,1);
// Inform user
llOwnerSay("AdminBot bot setup failed:\n"+
"error code: "+code+"\n"+
"expired: "+expires);
}
}