yaml
Functions:
get
yaml.get(path: string, key: string): any
Name
Type
Description
path
string
Path to the yaml file
key
string
Key to retrieve
Returns the corresponding value, which can be a string
, number
, boolean
, or a table
(for YAML lists).
set
yaml.get(path: string, key: string, value: any): boolean
Name
Type
Description
path
string
Path to the yaml file
key
string
Key to retrieve
value
any
Value to set
Sets and saves the value of a key in the specified YAML file. Returns false
on failure.
Example:
files.create_file("config.yml")
yaml.set("config.yml", "npc.name", "Steve")
local name = yaml.get("config.yml", "npc.name")
print(name) -- prints "Steve"
Last updated