Creating configuration file for skripts

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

KroterPvP

Active Member
Apr 10, 2017
178
7
18
22
I need somebody who wants to help me with a small tutorial about creating a "file.yml" to set messages and options there. Can you send me a link to a tutorial or just create one for me? Including all the posible yaml functions.

I know this:
code_language.skript:
on load:
    if file "plugins/SuperEconomy/Config.yml" doesn't exists:
        create file "plugins/SuperEconomy/Config.yml"
        wf "no-permission: &cYou are not allowed to do that!" to "plugins/SuperEconomy/Config.yml"
    set {no-permission} to value "no-permission" get of "plugins/SuperEconomy/Config.yml"
The config is created like this:
code_language.skript:
no-permission: §cYou are not allowed to do that!
1. I don't want color codes to be like "§". Is there any way to make color codes run with "&"?

2. I don't know how to create a config and set values to true or false to activate or deactivate some features of my skripts.

I need help with this too:
code_language.skript:
on load:
    if file "plugins/SuperEconomy/Config.yml" doesn't exists:
        create file "plugins/SuperEconomy/Config.yml"
        wf "balance: "&a%arg 3% &7has &a%{balance.%arg 3%}% &7coins!" to plugins/SuperEconomy/Config.yml"
    set {balance} to value "balance" get of "plugins/SuperEconomy/Config.yml"
command /balance:
    trigger:
        send {balance}
3. The message is not displayer well. The variables aren't replaced.
 
Last edited:
Status
Not open for further replies.