Solved Help with variable from yml to sk

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

SilentWolf

Member
Dec 17, 2017
3
0
0
48
Skript Version: 2.2
Skript Author: SilentWolf
Minecraft Version: 1.12.2

---
Hello,

i have a script like this, and i want to write the values from the yml to the sk. I dont know how!


These values should be replaced by the values from the yml in the sk file.
Code:
options:
 variable-1: 1
 variable-2: 2 
 variable-3: 3
 variable-4: 5
 variable-5: 6
 variable-6: 7  
 variable-7: 8
 variable-8: 9

This code creates the yml
Code:
[/COLOR][/FONT][/LEFT]
on load:
 if dir "plugins/test" exists: 
  stop
 create dir "plugins/test"
 if file "plugins/test/example.yml" doesn't exist:
  create file "plugins/test/example.yml"
  set {_configLines::*} to "variable-1: '1'" and "variable-2: '2'" and "variable-3: '3'" and "variable-4: '4'" and "variable-5: '5'" and "variable-6: '6'" and "variable-7: '7'" and "variable-8: '8'"
  set "plugins/test/example.yml"'s file contents to {_configLines::*}
[LEFT][FONT=Open Sans][COLOR=rgb(44, 44, 44)]

This code works without errors until now.
I do not know how to write the values from the yml back to the sk! With command / test reload


Sorry for my bad english im german.
 
Status
Not open for further replies.