To bounty: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Bale
r13581
 
imported>Eliteofdelete
No edit summary
 
Line 17: Line 17:
function_description=When supplied a string, returns the bounty that corresponds to the specified parameter {{pspan|convert}}. This is not a fuzzy match and it is not case-sensitive. The string needs to strictly match the name of the bounty, exactly.|
function_description=When supplied a string, returns the bounty that corresponds to the specified parameter {{pspan|convert}}. This is not a fuzzy match and it is not case-sensitive. The string needs to strictly match the name of the bounty, exactly.|


needscode=yes|
code1={{CodeSample|
title=Code Samples|
description=Following example shows basic to_bounty operations.|
code=
<syntaxhighlight>
print(to_bounty("dirty coal button"), "green");
print(to_bounty("dirty coal butto"), "red");
 
</syntaxhighlight>|
moreinfo=
It gives the following output.
<pre>
dirty coal button
none
</pre>
}}|
see_also={{SeeAlso|to_item|to_skill|to_stat}}|
see_also={{SeeAlso|to_item|to_skill|to_stat}}|
special=If no match is found for {{pspan|convert}}, this function returns $bounty[ none ].|
special=If no match is found for {{pspan|convert}}, this function returns $bounty[ none ].|

Latest revision as of 14:39, 26 January 2015

Function Syntax

bounty to_bounty(string convert )

  • convert is the string to convert

When supplied a string, returns the bounty that corresponds to the specified parameter convert. This is not a fuzzy match and it is not case-sensitive. The string needs to strictly match the name of the bounty, exactly.

Code Samples

Following example shows basic to_bounty operations.

print(to_bounty("dirty coal button"), "green");
print(to_bounty("dirty coal butto"), "red");

It gives the following output.

dirty coal button
none

See Also

to_item() | to_skill() | to_stat()

Special

If no match is found for convert, this function returns $bounty[ none ].