Skript Version: 2.2-dev37c
Skript Author: bensku
Minecraft Version: 1.12.2
---
Full Code:
Errors on Reload: None
Console Errors: None
Other Useful Info: This essentially grabs all the "presets" of plot types for my server from a YAML file and displays it in a GUI, and it works perfectly except for one thing. The third argument always is the last loop-value no matter the situation, and I've tried checking to make sure it loops through every value and it does. It just seems like the lambda is grabbing the last loop-value it finds, and I'm not sure of a workaround for this.
Have you tried searching the docs? YES
Have you tried searching the forums? YES
What other methods have you tried to fix it? I've tried a bunch of small changes but can't really wrap my head around a way to fix this.
Skript Author: bensku
Minecraft Version: 1.12.2
---
Full Code:
code_language.skript:
loop {_presets::*}:
set {_presets::%loop-value%::*} to yaml nodes "presets.%loop-value%" from "plugins/Skript/scripts/presets/presets.yml"
yaml value "presets.%loop-value-1%.inGui" from "plugins/Skript/scripts/presets/presets.yml" is true
set {_item} to yaml value "presets.%loop-value%.guiItem" from "plugins/Skript/scripts/presets/presets.yml"
set {_item} to {_item} parsed as item
set {_name} to yaml value "presets.%loop-value%.name" from "plugins/Skript/scripts/presets/presets.yml"
set {_lore} to yaml value "presets.%loop-value%.lore" from "plugins/Skript/scripts/presets/presets.yml"
format slot {_slot} of player with 1 of {_item} named "&r%colored {_name}%" with lore coloured {_lore} to close then run [execute console command "/b createplot %loop-value%"]
add 1 to {_slot}
Errors on Reload: None
Console Errors: None
Other Useful Info: This essentially grabs all the "presets" of plot types for my server from a YAML file and displays it in a GUI, and it works perfectly except for one thing. The third argument always is the last loop-value no matter the situation, and I've tried checking to make sure it loops through every value and it does. It just seems like the lambda is grabbing the last loop-value it finds, and I'm not sure of a workaround for this.
Have you tried searching the docs? YES
Have you tried searching the forums? YES
What other methods have you tried to fix it? I've tried a bunch of small changes but can't really wrap my head around a way to fix this.