My closet meat: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Grotfang
mNo edit summary
imported>Darzil
No edit summary
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<code>
{{
  int my_closet_meat() {
#vardefine:name|my_closet_meat}}{{
      string closet = visit_url('closet.php');
#vardefine:return_type|int}}{{
      string closetmeat = substring(closet, index_of(closet,"contains "), index_of(closet," meat"));
      return to_int(closetmeat);
  }
  print("my_meat --> " + my_meat());
  print("my_closet_meat --> " + my_closet_meat());
</code>


[[Category:Your Character | My Closet Meat()]]
FunctionPage|
[[Category:Ash Functions | My Closet Meat()]]
name={{#var:name}}|
 
function1={{Function|
name={{#var:name}}|
aggregate={{#var:aggregate}}|
return_type={{#var:return_type}}|
return_also={{#var:return_also}}|
}}|
 
function_description=Returns the amount of meat stored in your Colossal Closet.|
 
code1={{CodeSample|
title=Code Sample|
description=The following example shows how much meat you have between on-hand & in your closet.|
code=
<syntaxhighlight>
print("You have " + my_meat() + " meat on hand.");
print("You have " + my_closet_meat() + " meat in your closet.");
print("Between the two, you have " + (my_meat() + my_closet_meat()) + " meat altogether.");
</syntaxhighlight>}}|
 
see_also={{SeeAlso|my_meat|my_storage_meat|print}}|
}}
 
[[Category:Item Management]]

Latest revision as of 00:14, 4 December 2013

Function Syntax

int my_closet_meat()

Returns the amount of meat stored in your Colossal Closet.

Code Sample

The following example shows how much meat you have between on-hand & in your closet.

print("You have " + my_meat() + " meat on hand.");
print("You have " + my_closet_meat() + " meat in your closet.");
print("Between the two, you have " + (my_meat() + my_closet_meat()) + " meat altogether.");

See Also

my_meat() | my_storage_meat() | print()