Difference between pages "Use" and "To boolean"

From Kolmafia
(Difference between pages)
Jump to navigation Jump to search
imported>StDoodle
m
 
imported>StDoodle
m
 
Line 1: Line 1:
 
{{
 
{{
#vardefine:name|use}}{{
+
#vardefine:name|to_boolean}}{{
 
#vardefine:return_type|boolean}}{{
 
#vardefine:return_type|boolean}}{{
  
 
FunctionPage|
 
FunctionPage|
 
name={{#var:name}}|
 
name={{#var:name}}|
function_category=Item Management|
+
function_category=Datatype Conversions|
  
 
function1={{Function|
 
function1={{Function|
Line 12: Line 12:
 
return_type={{#var:return_type}}|
 
return_type={{#var:return_type}}|
 
return_also={{#var:return_also}}|
 
return_also={{#var:return_also}}|
parameter1={{Param|int|qty}}|
+
parameter1={{Param|any|anything}}|
parameter2={{Param|item|it}}|
+
p1desc={{Pspan|anything}} is any data type that KoLmafia uses|
p1desc={{pspan|qty}} is the quantity to use|
 
p2desc={{pspan|it}} is the item to use|
 
 
}}|
 
}}|
  
function_description=Attempts to use {{pspan|qty}} amount of item {{pspan|it}}. Returns true if the item is used or false if it fails to do so. Note that food must be "used" via eat() & drinks via drink(); attempting to use this function will result in an error message and a return value of false. Using this function for equipment will function the same as equip() would without the optional slot parameter. If this function is called with a non-usable item, a message saying so will print to the CLI and the function will return true.|
+
function_description=Converts stuff.
 +
* strings do this
 +
* ints do that.|
  
 
needscode=yes|
 
needscode=yes|
  
see_also={{SeeAlso|drink|eat|equip}}|
+
see_also={{SeeAlso|}}|
cli_equiv=The CLI command "use" functions similarly.|
+
cli_equiv=The CLI command |
 +
more_info= |
 +
special= |
 
}}
 
}}

Revision as of 00:06, 11 March 2010

needs(code_samples);

Function Syntax

boolean to_boolean(any anything )

  • anything is any data type that KoLmafia uses

Converts stuff.

  • strings do this
  • ints do that.

    CLI Equivalent

    The CLI command

    See Also