How to use variables in SkUttilities YAML

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

Lupe

Member
Jun 24, 2017
15
0
0
23
Hi. I have a big problem with variable in YAML value.
Code:
 set {ChatGuiPROgroupss::*} to file contents of "/plugins/ChatGuiPRO/data/groups/all.txt"
 loop {ChatGuiPROgroupss::*}:
  set {group} to loop-value parsed as text
  set {ipkick.%{group}%} to "%yaml value ""options.ip.kick_on_new_ip.%{group}%"" of file ""plugins/ChatGuiPRO/config.yml""%"
"Can't understand this expression: yaml value "options.ip.kick_on_new_ip. (ChatGuiPRO.sk, line 956: set {ipkick.%{group}%} to "%yaml value ""options.ip.kick_on_new_ip.%{group}%"" of file ""plugins/ChatGuiPRO/config.yml""%"')"

I tried this too, but it still not working
Code:
 set {ChatGuiPROgroupss::*} to file contents of "/plugins/ChatGuiPRO/data/groups/all.txt"
 loop {ChatGuiPROgroupss::*}:
  set {ipkick.%loop-value%} to value "options.ip.kick_on_new_ip.%loop-value%" get of "plugins/ChatGuiPRO/config.yml"
"'"plugins/ChatGuiPRO/config.yml"' is not an item stack (ChatGuiPRO.sk, line 1102: set {ipkick.%loop-value%} to value "options.ip.kick_on_new_ip.%loop-value%" get of "plugins/ChatGuiPRO/config.yml"') "

Can you please help me? I dont know how to do this.
File all.txt contains all groups
 
Last edited:
Hi. I have a big problem with variable in YAML value.
Code:
 set {ChatGuiPROgroupss::*} to file contents of "/plugins/ChatGuiPRO/data/groups/all.txt"
 loop {ChatGuiPROgroupss::*}:
  set {group} to loop-value parsed as text
  set {ipkick.%{group}%} to "%yaml value ""options.ip.kick_on_new_ip.%{group}%"" of file ""plugins/ChatGuiPRO/config.yml""%"
"Can't understand this expression: yaml value "options.ip.kick_on_new_ip. (ChatGuiPRO.sk, line 956: set {ipkick.%{group}%} to "%yaml value ""options.ip.kick_on_new_ip.%{group}%"" of file ""plugins/ChatGuiPRO/config.yml""%"')"

I tried this too, but it still not working
Code:
 set {ChatGuiPROgroupss::*} to file contents of "/plugins/ChatGuiPRO/data/groups/all.txt"
 loop {ChatGuiPROgroupss::*}:
  set {ipkick.%loop-value%} to value "options.ip.kick_on_new_ip.%loop-value%" get of "plugins/ChatGuiPRO/config.yml"
"'"plugins/ChatGuiPRO/config.yml"' is not an item stack (ChatGuiPRO.sk, line 1102: set {ipkick.%loop-value%} to value "options.ip.kick_on_new_ip.%loop-value%" get of "plugins/ChatGuiPRO/config.yml"') "

Can you please help me? I dont know how to do this.
File all.txt contains all groups
Try this:
code_language.skript:
set {ipkick.%{group}%} to yaml value "options.ip.kick_on_new_ip.%{group}%" of file "plugins/ChatGuiPRO/config.yml"
 
  • Like
Reactions: Lupe
Status
Not open for further replies.