Difference between revisions of "My id"

From Kolmafia
Jump to navigation Jump to search
imported>Zarqon
(created page with small example)
 
imported>Zarqon
m (pre to code for consistency, more links)
Line 3: Line 3:
 
This function returns the logged-in character's id number as a [[string]].
 
This function returns the logged-in character's id number as a [[string]].
  
 +
This example visits your public charsheet:
 +
 +
<code>
 +
  [[visit_url]]("showplayer.php?who="+[[my_id()]]);
 +
</code>
 
[[Category:Your Character | My ID()]]
 
[[Category:Your Character | My ID()]]
 
[[Category:Ash Functions | My ID()]]
 
[[Category:Ash Functions | My ID()]]
<pre>// This example visits your public charsheet
 
visit_url("showplayer.php?who="+my_id());
 
</pre>
 
  
 
When no character is logged in, this functions returns "0".
 
When no character is logged in, this functions returns "0".

Revision as of 05:30, 29 January 2009

string my_id()

This function returns the logged-in character's id number as a string.

This example visits your public charsheet:

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

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