Inaccessible reason: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Bale
r9555
 
imported>Bale
No edit summary
Line 1: Line 1:
{{
{{
#vardefine:name|inaccessible_reason}}{{
#vardefine:name|inaccessible_reason}}{{
#vardefine:return_type|boolean}}{{
#vardefine:return_type|string}}{{


FunctionPage|
FunctionPage|

Revision as of 19:53, 20 July 2011

Function Syntax

boolean inaccessible_reason(coinmaster master )

  • master is the coinmaster to check

Returns a sentence explaining why master is currently unavailable. If master is available, then it returns an empty string.

Code Sample

Check if a coinmaster is available and if not, explains why.

boolean check(coinmaster master) {
   if(is_accessible(master))
      return true;
   print(master+ " is not accesible! "
      + inaccessible_reason(master));
   return false;
}

See Also

inaccessible_reason() | to_coinmaster() | is_coinmaster_item()