Help with YML

  • 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.

FinalPlayer024

Active Member
Oct 19, 2017
94
4
0
29
Skript Code (only "on load" event)
code_language.skript:
  file "plugins/Skript/scripts/Staff-Bot/config.yml" doesn't exist:

    send "<light red>[!] Sto preparando il config.yml, attendere..." to console
    send "<light gray>Directory: plugins/Skript/scripts/Staff-Bot/config.yml" to console

    create file "plugins/Skript/scripts/Staff-Bot/config.yml"
 
    wf "## Creato da FinalPlayer024 - @SkriptGeT" to "plugins/Skript/scripts/Staff-Bot/config.yml"
    wf "## File di configurazione" to "plugins/Skript/scripts/Staff-Bot/config.yml"

 
    set "Staff-Bot.Prefix" to "[STAFF-BOT] :" in yaml file "plugins/Skript/scripts/Staff-Bot/config.yml"
    #Here I want to add a "spacer"
    set "Staff-Bot.StaffChat (modifica sotto).Prefix" to "Staff-Bot" in yaml file "plugins/Skript/scripts/Staff-Bot/config.yml"
    #Here I want to add a "spacer"
    add "ParolaBandita123456" to yaml list "Staff-Bot.AntiCurses" from "../../Skript/scripts/Staff-Bot/config.yml"
    add "SecondaParolaBandita123456" to yaml list "Staff-Bot.AntiCurses" from "../../Skript/scripts/Staff-Bot/config.yml"


It all works fine, but I wanted to add some "spacers", I tried "write file" but it didn't work, I also tried
code_language.skript:
set "Staff-Bot.   " to "   " in yaml file "plugins/Skript/scripts/Staff-Bot/config.yml"
, it worked but I don't really like how it is written in the yaml file

YAML Fle without spacers
code_language.skript:
# Creato da FinalPlayer024 - @SkriptGeT
# File di configurazione

Staff-Bot:
  Prefix: '[STAFF-BOT] :'
  StaffChat (modifica sotto):
    Prefix: Staff-Bot
  AntiCurses:
  - ParolaBandita123456
  - SecondaParolaBandita123456

YAML File with spacers
code_language.skript:
# Creato da FinalPlayer024 - @SkriptGeT
# File di configurazione

Staff-Bot:
  Prefix: '[STAFF-BOT] :'
  '   ': '   '
  StaffChat (modifica sotto):
    Prefix: Staff-Bot
    '   ':'   '
  AntiCurses:
  - ParolaBandita123456
  - SecondaParolaBandita123456
[doublepost=1527849720,1527601274][/doublepost]??
[doublepost=1528179988][/doublepost]:emoji_heart:
 
don't use whatever you're using for yaml, skript-yaml is the only good choice.
 
Status
Not open for further replies.