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

Aztron

New Member
Mar 15, 2017
7
0
0
29
Hello! I want to write in yaml like this:
code_language.skript:
prefix: "\xa73\xa7l[\xa7d\xa7lTestPrefix\xa73\xa7l]"
#Main prefix of the plugin
PermissionsEx: 'true'
# Set to True if you are using PEX
Radius: '1.5'
# Set the radius of the explosion
I want to put the description of each but dont works!
my code:
code_language.skript:
if file "plugins/test/config.yml" doesn't exists:
  set "prefix" to "&3&l[&d&lTestPrefix&3&l]" in yaml file "plugins/test/config.yml"
  c l "##Main prefix of the plugin" in "plugins/test/config.yml"
  set "PEX" to "false" in yaml file "plugins/test/config.yml"
  c l "##Set to True if you are using PEX" in "plugins/test/config.yml"
  set "Radius" to "1.5" in yaml file "plugins/test/config.yml
  c l "##Set the radius of the explosion" in "plugins/test/config.yml"
 
Hello! I want to write in yaml like this:
code_language.skript:
prefix: "\xa73\xa7l[\xa7d\xa7lTestPrefix\xa73\xa7l]"
#Main prefix of the plugin
PermissionsEx: 'true'
# Set to True if you are using PEX
Radius: '1.5'
# Set the radius of the explosion
I want to put the description of each but dont works!
my code:
code_language.skript:
if file "plugins/test/config.yml" doesn't exists:
  set "prefix" to "&3&l[&d&lTestPrefix&3&l]" in yaml file "plugins/test/config.yml"
  c l "##Main prefix of the plugin" in "plugins/test/config.yml"
  set "PEX" to "false" in yaml file "plugins/test/config.yml"
  c l "##Set to True if you are using PEX" in "plugins/test/config.yml"
  set "Radius" to "1.5" in yaml file "plugins/test/config.yml
  c l "##Set the radius of the explosion" in "plugins/test/config.yml"

skUtilities
code_language.skript:
et line %number% in file %string% to %string%
set file %string%'s line %number% to %string%

set line 3 in file "plugins\text.txt" to "hello"

code_language.skript:
write %string% at line %numbers% to file %string%

write "hello" at line 3 to file "plugins\text.txt"

Tutorial: https://forums.skunity.com/threads/reading-writing-and-deleting-yaml.33/
 
Status
Not open for further replies.