Difference between revisions of "My name"

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
m
imported>StDoodle
m
Line 1: Line 1:
 +
{{#vardefine:name|my_name}}
 +
{{#vardefine:return_type|string}}
 
{{FunctionPage|
 
{{FunctionPage|
page_name=my_name|
+
name={{#var:name}}|
 
function_category=Your Character|
 
function_category=Your Character|
function1_return_type=string|
+
function1={{Function|
 +
name={{#var:name}}|
 +
aggregate={{#var:aggregate}}|
 +
return_type={{#var:return_type}}|
 +
return_also={{#var:return_also}}||
 
function_description=Returns the name of the logged-in character, all in lowercase.|
 
function_description=Returns the name of the logged-in character, all in lowercase.|
 
code1={{CodeSample|
 
code1={{CodeSample|
Line 8: Line 14:
 
description=This example imports different breakfast scripts depending on which character is running the script.|
 
description=This example imports different breakfast scripts depending on which character is running the script.|
 
code=
 
code=
<syntaxhighlight lang="c">
+
<syntaxhighlight>
 
if (my_name() == "MyMain") {
 
if (my_name() == "MyMain") {
 
   import <MainBreakfast.ash>;
 
   import <MainBreakfast.ash>;
Line 19: Line 25:
 
description=Note that capitalization is not strictly adhered to (much as with the chat command "/whois" in game). The following two examples are functionally equivalent.|
 
description=Note that capitalization is not strictly adhered to (much as with the chat command "/whois" in game). The following two examples are functionally equivalent.|
 
code=
 
code=
<syntaxhighlight lang="c">
+
<syntaxhighlight>
 
if (my_name() == "MyCharacter") {
 
if (my_name() == "MyCharacter") {
 
   //code
 
   //code
Line 26: Line 32:
 
code3={{CodeSample|
 
code3={{CodeSample|
 
code=
 
code=
<syntaxhighlight lang="c">
+
<syntaxhighlight>
 
if (my_name() == "mycharacter") {
 
if (my_name() == "mycharacter") {
 
   //code
 
   //code

Revision as of 11:58, 28 February 2010


{{FunctionPage| name=my_name| function_category=Your Character|

function1=

string my_name()