Config.GetOption
Tries to get a value from a config.
Syntax
Config.GetOption *config "key" default_value?
Returns
unknown value
Arguments
| Name | Required | Type | Description |
|---|---|---|---|
config | Yes | a reference to CustomConfig object. | |
key | Yes | Any text e.g. "Hello, World!" | |
default value | No | Any value | The value to return if the key is not found. |
Details
It's advised that you set the 'default value' argument if you don't want an error to occur if no key is found.
Possible errors
- The requested key was not found in the config.
On a running server
Use serhelp Config.GetOption to inspect the reference generated by your installed SER version.