Difference between pages "User:Wrldwzrd89" and "Get florist plants"
(Difference between pages)
Jump to navigation
Jump to search
imported>Wrldwzrd89 (Creating my user page.) |
imported>Bale (r12244) |
||
Line 1: | Line 1: | ||
− | + | {{ | |
+ | #vardefine:name|my_effects}}{{ | ||
+ | #vardefine:return_type|string [location] [int]}}{{ | ||
+ | #vardefine:aggregate|yes}}{{ | ||
+ | FunctionPage| | ||
+ | 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 a map of all {{kolwiki|The Florist Friar's Cottage|plants}} currently planted at each location.| | ||
+ | |||
+ | code1={{CodeSample| | ||
+ | title=Code Sample| | ||
+ | description=Print all current plants.| | ||
+ | code= | ||
+ | <syntaxhighlight> | ||
+ | foreach loc, counter, plant in get_florist_plants() { | ||
+ | if( plant != "" ) { | ||
+ | print( "Location '" + loc + "'" ); | ||
+ | print( "Plant " + counter + ": '" + plant + "'" ); | ||
+ | } | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | }}| | ||
+ | |||
+ | see_also={{SeeAlso|florist_available}}| | ||
+ | }} | ||
+ | |||
+ | [[Category:Your Character]] |
Revision as of 08:08, 19 November 2014
Function Syntax
string [location] [int] my_effects()
Returns the a map of all plants currently planted at each location.
Code Sample
Print all current plants.
foreach loc, counter, plant in get_florist_plants() {
if( plant != "" ) {
print( "Location '" + loc + "'" );
print( "Plant " + counter + ": '" + plant + "'" );
}
}