My id: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
mNo edit summary
imported>Bale
mNo edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{FunctionPage |
{{
page_name=my_id|
#vardefine:name|my_id}}{{
function1_return_type=string|
#vardefine:return_type|string}}{{
function_description=Returns the Character ID of the logged-in character. |
 
code1={{CodeSample |
FunctionPage|
name={{#var:name}}|
function1={{Function|
name={{#var:name}}|
aggregate={{#var:aggregate}}|
return_type={{#var:return_type}}|
return_also={{#var:return_also}}
}}|
function_description=Returns the Character ID of the logged-in character.|
code1={{CodeSample|
title=Code Sample|
title=Code Sample|
description=This example allows you to visit your own charsheet.|
description=This example allows you to visit your own charsheet.|
code=
code=
<syntaxhighlight lang="c">
<syntaxhighlight>
visit_url("showplayer.php?who=" + my_id());
visit_url("showplayer.php?who=" + my_id());
</syntaxhighlight>}} |
</syntaxhighlight>
special=When no character is logged in, this function returns "0".
}}|
see_also={{SeeAlso|my_name}}|
special=When no character is logged in, this function returns the Character ID of the last logged-in character or 0 if no character has logged in yet.
}}
}}
[[Category:Your Character]]
[[Category:Your Character]]

Latest revision as of 21:31, 21 May 2010

Function Syntax

string my_id()

Returns the Character ID of the logged-in character.

Code Sample

This example allows you to visit your own charsheet.

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

See Also

my_name()

Special

When no character is logged in, this function returns the Character ID of the last logged-in character or 0 if no character has logged in yet.