Solved Looping specified nodes using skript-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 community!

    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.

jaylawl

Active Member
Jan 29, 2017
173
31
0
Hello.

Currently, when loading data from a yml file, i'm often resorting to using this (obviously with SkUtilities):

code_language.skript:
loop yml nodes "FirstNode" of file "{@file.yml}":
    set {_stuff} to loop-value

    # do stuff with {_stuff}
Note that the code above will set {_stuff} *only* the next nodes that branch off "FirstNode".

I have just discored skript-yaml and am quite hyped, because of the performance implications, as i do use yaml a lot and am currently having some issues that aren't resolvable with SkUtilities.

Now i'm trying to get the same result as above right now, with skript-yaml instead.
code_language.skript:
loop yaml nodes from "file.yml":
    broadcast "%loop-value%"
This code will correctly loop all nodes from the cached file. But:
code_language.skript:
loop yaml nodes "Gadgets" from "file.yml":
    broadcast "%loop-value%"
code_language.skript:
loop yaml nodes "" from "file.yml":
    broadcast "%loop-value%"
These codes won't return anything.

What am i doing wrong here?

Thanks for your time.
[doublepost=1530133725,1530131788][/doublepost]The solution is:
code_language.skript:
loop yaml nodes with keys "FirstNode" from "file.yml":
 
Status
Not open for further replies.