Difference between pages "File:Swordbot345.png" and "Inaccessible reason"
(Difference between pages)
Jump to navigation
Jump to search
imported>Fewyn (Testing) |
imported>Relyk |
||
Line 1: | Line 1: | ||
− | + | {{ | |
+ | #vardefine:name|inaccessible_reason}}{{ | ||
+ | #vardefine:return_type|string}}{{ | ||
+ | |||
+ | FunctionPage| | ||
+ | name={{#var:name}}| | ||
+ | |||
+ | function1={{Function| | ||
+ | name={{#var:name}}| | ||
+ | aggregate={{#var:aggregate}}| | ||
+ | return_type=string| | ||
+ | return_also={{#var:return_also}}| | ||
+ | parameter1={{Param|coinmaster|master}}| | ||
+ | p1desc={{pspan|master}} is the coinmaster to check| | ||
+ | |||
+ | }}| | ||
+ | |||
+ | function_description=Returns a sentence explaining why {{pspan|master}} is currently unavailable. If {{pspan|master}} is available, then it returns an empty string.| | ||
+ | |||
+ | code1={{CodeSample| | ||
+ | title=Code Sample| | ||
+ | description=Check if a coinmaster is available and if not, explains why.| | ||
+ | code= | ||
+ | <syntaxhighlight> | ||
+ | boolean check(coinmaster master) { | ||
+ | if(is_accessible(master)) | ||
+ | return true; | ||
+ | print(master+ " is not accesible! " | ||
+ | + inaccessible_reason(master)); | ||
+ | return false; | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | }}| | ||
+ | |||
+ | see_also={{SeeAlso|is_accessible|to_coinmaster|is_coinmaster_item}}| | ||
+ | }} | ||
+ | |||
+ | [[Category:Item Management]] |
Latest revision as of 03:17, 27 September 2015
Function Syntax
string 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
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 23:55, 9 November 2020 | 135 × 135 (10 KB) | Maintenance script (talk | contribs) |
You cannot overwrite this file.
File usage
There are no pages that use this file.