Eat

From Kolmafia
Revision as of 13:37, 20 December 2009 by 58.175.86.180 (talk) (Added details about boolean return value.)
Jump to navigation Jump to search

boolean eat(int quantity, item itemtype)

Will attempt to eat the number of food specified. The return value only tells you whether the item can be eaten, not if you have enough room for it.

So,
eat(3,$item[stinky hi mein]);
will eat 3 stinky hi meins (depending on fullness) and return true.

While,
eat(3,$item[blue pixel]);
will tell you that a blue pixel cannot be consumed and return false.