Can eat: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Efilnikufecin
No edit summary
 
imported>Zarqon
more links, logged out info, consistent formatting
Line 1: Line 1:
[[boolean]] can_eat()
[[boolean]] [[can_eat()]]


This function returns <i>true</i> if the logged-in character is not subject to the dietary restrictions of a Boozetafarian or Oxygenarian path. If the character is subject to those restrictions this function returns false.
This function returns ''true'' if the logged-in character is not subject to the dietary restrictions of a Boozetafarian or Oxygenarian path. If the character is subject to those restrictions this function returns ''false''.
 
An example:


<code>
<code>
if(can_eat())  
  if ([[can_eat()]])  
  {
    [[eat()|eat]](3,$[[item]][hot hi mein]);
  eat(3,$[[item]][hot hi mein]);
  }
</code>
</code>
[[Category:Your Character | Can eat()]]
[[Category:Your Character | Can eat()]]
[[Category:Ash Functions |Can eat()]]
[[Category:Ash Functions |Can eat()]]
When not logged in, this function returns ''true''.

Revision as of 06:56, 29 January 2009

boolean can_eat()

This function returns true if the logged-in character is not subject to the dietary restrictions of a Boozetafarian or Oxygenarian path. If the character is subject to those restrictions this function returns false.

 if (can_eat()) 
   eat(3,$item[hot hi mein]);

When not logged in, this function returns true.