Difference between revisions of "Bot Playground/Commands/key2name"

From SmartBots Developers Docs
Jump to: navigation, search
Line 1: Line 1:
 
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
 
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
<onlyinclude>...</onlyinclude>
+
<onlyinclude>Returns avatar Second Life name by UUID.</onlyinclude> The command works in opposition to [[Bot Playground/Commands/name2key|name2key]].
  
 
<syntaxhighlight lang="javascript">
 
<syntaxhighlight lang="javascript">
...
+
Bot.key2name(key)
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Revision as of 16:22, 1 July 2016

Returns avatar Second Life name by UUID. The command works in opposition to name2key.

Bot.key2name(key)

Reference

This command accepts the following parameters:

Variable Required Description


Input:
key yes the UUID of the avatar
Output:
name Second Life name of the avatar

Examples

var slname = "Glaznah Gassner";

Bot.name2key(slname)
.then(function(result) {
  if(result.success) {
    console.log("The UUID of " + slname + " is " + result.slkey);
  } else {
    console.log("Error executing name2key: " + result.error);
  }
	
  return Bot.key2name(result.slkey);
})
.then(function(result) {
  console.log("Backward key2name check. Name: " + result.slname);
});