Status codes
"Command status code" is additional information you receive with the AdminBot event.
How to get the code
Events come to your script using link_message:
link_message( integer sender_num, integer num, string str, key id )The "Command status code" is located in the str variable
(while num holds the AdminBot event ID).
Status Codes
The possible status codes are listed below:
Possible events | Status code | Description |
|---|---|---|
|
| Command succeed, group subscription valid. |
|
| The command you've sent is unknown. Try upgrading to the most newest version. |
|
| This SmartBots service is not available for you. Refer to SmartBots Services page for details. |
|
| You are trying to issue the command, but AdminBot does not know it's group yet (use |
|
| The group you are trying to use does not exist. You have to visit mysmartbots.com and list your group |
|
| You have specified the wrong Security Code while setting the group using |
|
| You've listed your group with SmartBots, but did not paid your subscription yet. |
|
| Your SmartBots subscription has expired. The expiration date attached. |
|
| Editor will process and start your order shortly. Please wait a bit. |
|
| Error occured while trying to listen for the group chat |
Example
The following example shows how to parse group setup error.
In this example we receive the SB_SETUP_FAILED event: this means that AdminBot can't use the group you've asked.
We should try to understand what's wrong with the group (usually the group name error, or SmartBots subscription has expired).
link_message(integer sender, integer cmd, string data, key id) {
/////////////////// Group setup failed event
if(cmd == SB_SETUP_FAILED) {
// We split the string parameter to the lines
list parts = llParseString2List(data, ["\n"], []);
// The first line is a status code, and second line is the group expiration date
string code = llList2String(parts, 0);
string expires = llList2String(parts, 1);
// Inform user
llOwnerSay("AdminBot group setup failed:\n" +
"error code: " + code + "\n" +
"expired: " + expires);
}
}