Hello.
Currently, when loading data from a yml file, i'm often resorting to using this (obviously with SkUtilities):
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.
This code will correctly loop all nodes from the cached file. But:
These codes won't return anything.
What am i doing wrong here?
Thanks for your time.
[doublepost=1530133725,1530131788][/doublepost]The solution is:
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}
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%"
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%"
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":