Path id to name: Difference between revisions
Jump to navigation
Jump to search
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..." |
No edit summary |
||
Line 1: | Line 1: | ||
{{deprecated|mafiaref=r26713|more_info=Use <code>[[to_path]](id).name</code> instead.}} | |||
{{ | {{ | ||
#vardefine:name|path_id_to_name}}{{ | #vardefine:name|path_id_to_name}}{{ |
Latest revision as of 19:22, 2 October 2022
This function is deprecated in KoLmafia r26713.
Use to_path(id).name
instead.
Function Syntax
string path_id_to_name(int id )
- id is the ID of the path to convert
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
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".