⚒️Config

Table to work with configs that are stored in the configs folder with the .ini extention.

ReadInt(config: string, key: string, def [?]: integer): integer

Name
Type
Description

config

string

The config file name.

key

string

The key to read.

def [?]

integer

The default value to return if the key is not found. (default: 0)

Read an integer from a config file.


ReadFloat(config: string, key: string, def [?]: number): number

Name
Type
Description

config

string

The config file name.

key

string

The key to read.

def [?]

number

The default value to return if the key is not found. (default: 0.0)

Read a float from a config file.


ReadString(config: string, key: string, def [?]: string): string

Name
Type
Description

config

string

The config file name.

key

string

The key to read.

def [?]

string

The default value to return if the key is not found. (default: "")

Read a string from a config file.


WriteInt(config: string, key: string, value: integer): nil

Name
Type
Description

config

string

The config file name.

key

string

The key to write.

value

integer

The value to write.

Write an integer to a config file.


WriteFloat(config: string, key: string, value: number): nil

Name
Type
Description

config

string

The config file name.

key

string

The key to write.

value

number

The value to write.

Write a float to a config file.


WriteString(config: string, key: string, value: string): nil

Name
Type
Description

config

string

The config file name.

key

string

The key to write.

value

string

The value to write.

Write a string to a config file.

Last updated