Voting booth initiatives: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
Gausie (talk | contribs)
Created page with "{{ #vardefine:name|voting_booth_initiatives}}{{ #vardefine:return_type|string [string]}}{{ #vardefine:aggregate|yes}}{{ FunctionPage| name={{#var:name}}| function1={{Functio..."
 
Updated the syntax of my_path().id and for the error "Function 'voting_booth_initiative( class, int, int )' undefined."
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{
{{
#vardefine:name|voting_booth_initiatives}}{{
#vardefine:name|voting_booth_initiatives}}{{
#vardefine:return_type|string [string]}}{{
#vardefine:return_type|boolean [string]}}{{
#vardefine:aggregate|yes}}{{
#vardefine:aggregate|yes}}{{FunctionPage|
 
FunctionPage|
name={{#var:name}}|
name={{#var:name}}|


Line 15: Line 13:
p1desc={{pspan|class}} is the class for the seed|
p1desc={{pspan|class}} is the class for the seed|
parameter2={{Param|int|path}}|
parameter2={{Param|int|path}}|
p2desc={{pspan|class}} is the path id for the seed|
p2desc={{pspan|path}} is the path id for the seed|
parameter3={{Param|int|daycount}}|
parameter3={{Param|int|daycount}}|
p3desc={{pspan|daycount}} is the daycount for the seed|
p3desc={{pspan|daycount}} is the daycount for the seed|
}}|
}}|


function_description=Returns a map of voting initiatives that are available for a given class on a given day of an ascension in a given path
function2={{Function|
name={{#var:name}}|
aggregate={{#var:aggregate}}|
return_type={{#var:return_type}}|
return_also={{#var:return_also}}|
parameter1={{Param|int|class}}|
p1desc={{pspan|class}} is the class id for the seed|
parameter2={{Param|int|path}}|
parameter3={{Param|int|daycount}}|
}}|
 
function_description=Returns a list of voting initiatives that are available for a given class on a given day of an ascension in a given path|


code1={{CodeSample|
code1={{CodeSample|
Line 27: Line 36:
code=
code=
<syntaxhighlight>
<syntaxhighlight>
string [string] initiatives = voting_booth_initiative( my_class(), my_path_id(), my_daycount() );
boolean [string] initiatives = voting_booth_initiatives( my_class(), my_path().id, my_daycount() );
dump( initiatives );
dump( initiatives );
</syntaxhighlight>}}|
</syntaxhighlight>}}|
}}
}}

Latest revision as of 16:17, 17 January 2025

Function Syntax

boolean [string] voting_booth_initiatives(class class ,int path ,int daycount )

  • class is the class for the seed
  • path is the path id for the seed
  • daycount is the daycount for the seed

boolean [string] voting_booth_initiatives(int class ,int path ,int daycount )

  • class is the class id for the seed

Returns a list of voting initiatives that are available for a given class on a given day of an ascension in a given path

Code Sample

The following will tell you the initiatives available to you today without you ever having to visit the booth.

boolean [string] initiatives = voting_booth_initiatives( my_class(), my_path().id, my_daycount() );
dump( initiatives );