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 How to write a yml

Discussion in 'Skript' started by Aztron, Mar 15, 2017.

Thread Status:
Not open for further replies.
  1. Aztron

    Aztron New Member

    Joined:
    Mar 15, 2017
    Messages:
    7
    Likes Received:
    0
    Hello! I want to write in yaml like this:
    Code (Skript):
    1. prefix: "\xa73\xa7l[\xa7d\xa7lTestPrefix\xa73\xa7l]"
    2. #Main prefix of the plugin
    3. PermissionsEx: 'true'
    4. # Set to True if you are using PEX
    5. Radius: '1.5'
    6. # Set the radius of the explosion
    I want to put the description of each but dont works!
    my code:
    Code (Skript):
    1. if file "plugins/test/config.yml" doesn't exists:
    2.   set "prefix" to "&3&l[&d&lTestPrefix&3&l]" in yaml file "plugins/test/config.yml"
    3.   c l "##Main prefix of the plugin" in "plugins/test/config.yml"
    4.   set "PEX" to "false" in yaml file "plugins/test/config.yml"
    5.   c l "##Set to True if you are using PEX" in "plugins/test/config.yml"
    6.   set "Radius" to "1.5" in yaml file "plugins/test/config.yml
    7.  c l "##Set the radius of the explosion" in "plugins/test/config.yml"
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    skUtilities
    Code (Skript):
    1. et line %number% in file %string% to %string%
    2. set file %string%'s line %number% to %string%
    3.  
    4. set line 3 in file "plugins\text.txt" to "hello"
    Code (Skript):
    1. write %string% at line %numbers% to file %string%
    2.  
    3. write "hello" at line 3 to file "plugins\text.txt"
    Tutorial: https://forums.skunity.com/threads/reading-writing-and-deleting-yaml.33/
     
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    it works! Ty bro
     
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    Np mate ! Mark the question as solution.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...