1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Help with variable from yml to sk

Discussion in 'Skript' started by SilentWolf, Dec 17, 2017.

Tags:
Thread Status:
Not open for further replies.
  1. SilentWolf

    SilentWolf Member

    Joined:
    Dec 17, 2017
    Messages:
    3
    Likes Received:
    0
    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 ( (Unknown Language)):
    1.  
    2. options:
    3.  variable-1: 1
    4.  variable-2: 2
    5.  variable-3: 3
    6.  variable-4: 5
    7.  variable-5: 6
    8.  variable-6: 7  
    9.  variable-7: 8
    10.  variable-8: 9
    11.  
    This code creates the yml
    Code ( (Unknown Language)):
    1. [/COLOR][/FONT][/LEFT]
    2. on load:
    3.  if dir "plugins/test" exists:
    4.   stop
    5.  create dir "plugins/test"
    6.  if file "plugins/test/example.yml" doesn't exist:
    7.   create file "plugins/test/example.yml"
    8.   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'"
    9.   set "plugins/test/example.yml"'s file contents to {_configLines::*}
    10. [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.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...