To path

From Kolmafia
Revision as of 18:12, 2 October 2022 by QuietMisdreavus (talk | contribs) (Created page with "{{ #vardefine:name|to_path}}{{ #vardefine:return_type|path}}{{ FunctionPage| name={{#var:name}}| function1={{Function| name={{#var:name}}| aggregate={{#var:aggregate}}| retu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function Syntax

path to_path(int id )

  • id is the path ID to convert

path to_path(string name )

  • name is the path name to convert

Returns the specified path name or id as a path.

Code Samples

Following example shows basic to_path operations.

print(to_path("StAnDaRd"), "green");
print(to_path("stand"), "red");
print("");
if (to_path("StAnDaRd") == my_path())
   print("I'm in a Standard run!", "green");
else print("I am not in Standard...", "blue");

It gives the following output (for characters in a Standard ascension).

Standard
none

I'm in a Standard run!