Note: It is advised that you read the configuration documentation before this page in order to familiarise yourself with relevant terms and concepts.
Parameter | Type | Description |
path | string[] |
A list of categories followed by the key for the config item to read.
General.Version would be specified by ['General', 'Version'] |
Return type is deduced from item type in the config.
Type | Description |
int | The value of an Integer config item. |
float | The value of a Float config item. |
string | The value of a String config item. |
Returns the relevant configuration value from the main configuration file. The path should specify a full list of categories and subcategories to identify the item, if neccesary.
In the event that multiple items have the same key in a category, the first encountered reading down the file is the one returned.
import agan
class game():
def create(self):
ver = agan.getconf(['General', 'Version'])
agan.log("Running under AGA version " + ver)
return self
#
def update(self):
pass
#
def close(self):
pass