Create: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Bale
No edit summary
imported>Heeheehee
m Missing "else" provided.
Line 28: Line 28:
if(success)
if(success)
   print("You have made 1 mandarina colada.");
   print("You have made 1 mandarina colada.");
print("You failed to make a mandarina colada.");
else print("You failed to make a mandarina colada.");
</syntaxhighlight>
</syntaxhighlight>
}}|
}}|

Revision as of 05:23, 28 March 2010

Function Syntax

boolean create(int qty ,item make )

  • qty is the quantity to create
  • make is the item to create

Attempts to create qty of make, following your KoLmafia settings regarding purchases to gather ingredients & require boxen. Returns true if all items are successfully created, and false otherwise.

Code Sample

Create an item and report on it's success.

boolean success = create(1, $item[mandarina colada]);
if(success)
   print("You have made 1 mandarina colada.");
else print("You failed to make a mandarina colada.");

CLI Equivalent

The CLI command "create" works similarly when supplied with an item as a parameter.

See Also

retrieve_item()


Attention KoLmafia Experts!

We need your help; some details of this function's operation are unknown or unclear.

The following specific question has been raised:

  • Is the return value given correct? Any exceptions?