Path id to name

From Kolmafia
Revision as of 22:37, 7 June 2020 by imported>Fredg1 (Created page with "{{ #vardefine:name|path_id_to_name}}{{ #vardefine:return_type|string}}{{ FunctionPage| name={{#var:name}}| function1={{Function| name={{#var:name}}| aggregate={{#var:aggrega...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function Syntax

string path_id_to_name(int id )

Returns the name of the specified path id.

Code Samples

Following example shows basic path_id_to_name operations.

int first = 3;
int second = 7;
int third = 24;

print(first+" gives "+path_id_to_name(first)+".");
print(second+" gives "+path_id_to_name(second)+".");
print(third+" gives "+path_id_to_name(third)+".");

Gives the following output.

3 gives Oxygenarian.
7 gives Trendy.
24 gives One Crazy Random Summer.

See Also

my_path() | my_path_id() | path_name_to_id()

Special

Returns "None" when submitting an ID which doesn't have a known path tied to, such as 5 (never released), or 60 (not yet known). Also, the 3 first unknown paths return "Path id", for internal reasons (as of writing this, for example, 40, 41 and 42 return "Path 40", "Path 41" and "Path 42".