Difference between revisions of "My id"

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
m (moved My id() to My id)
imported>StDoodle
m
Line 1: Line 1:
{{DISPLAYTITLE:my_id()}}
+
{{FunctionPage |
{{function|
+
page_name=my_id|
name=my_id|
+
function1_return_type=string|
returns=string|
+
function_description=Returns the ID number of the logged-in character. |
 +
code1={{CodeSample |
 +
title=Code Sample|
 +
description=This example allows you to visit your own charsheet.|
 +
code=
 +
<syntaxhighlight lang="c">
 +
visit_url("showplayer.php?who=" + my_id());
 +
</syntaxhighlight>}} |
 +
special=When no character is logged in, this function returns "0".
 
}}
 
}}
 
+
[[Category:Your Character]]
This function returns the logged-in character's id number as a [[string]].
 
 
 
This example visits your public charsheet:
 
 
 
<code>
 
  [[visit_url()|visit_url]]("showplayer.php?who=" + [[my_id()]]);
 
</code>
 
 
 
When no character is logged in, this functions returns "0".
 
 
 
[[Category:Your Character | My ID()]]
 

Revision as of 12:39, 25 February 2010

Function Syntax

Returns the ID number of the logged-in character.

Code Sample

This example allows you to visit your own charsheet.

visit_url("showplayer.php?who=" + my_id());

Special

When no character is logged in, this function returns "0".