I'm trying to get a skript to pull from a YML droptable, cloning some code I used in a previous droptable, however it's spitting some errors that it can't find the node correctly.
Spigot 1.8.8-R01-SNAPSHOT (CraftBukkit)
Skript 2.2-Fixes-V9b by Njol
Umbaska 2.0 Beta 5.5.1 by nfell2009 and Gatt
SkQuery 3.21.4 by w00tmast3r
SkUtilities 0.8.8 by tim740
SkRayFall 1.9.2 by eyesniper2
Any way I can adjust my code to make it work? Here's the line that's just pulling the YML and storing it in a nest variable.
Error log:
Entire Skript:
YML:
Code:
v0.8.8: Yaml Path: 'treasure.yes.hunter' doesn't exist in file blah blah blah
Spigot 1.8.8-R01-SNAPSHOT (CraftBukkit)
Skript 2.2-Fixes-V9b by Njol
Umbaska 2.0 Beta 5.5.1 by nfell2009 and Gatt
SkQuery 3.21.4 by w00tmast3r
SkUtilities 0.8.8 by tim740
SkRayFall 1.9.2 by eyesniper2
Any way I can adjust my code to make it work? Here's the line that's just pulling the YML and storing it in a nest variable.
Code:
set {_treasure::yes::*} to yml list "treasure.yes.warlock" from file "plugins/Skript/Cryptarch/TreasureTable.yml"
Error log:
Code:
24.04 19:10:43 [Server] ERROR v0.8.8: Yaml Path: 'treasure.yes.hunter' doesn't exist in file '/plugins/Skript/Cryptarch/TreasureTable.yml' (SExprYaml.class)
Entire Skript:
Code:
on right click holding brick:
loop all items in the player's inventory:
add 1 to {_tmp}
if {_tmp} is 36:
message "Your inventory is full, make some space."
if {_tmp} is less than 36:
message "You have inventory space."
set {_alltreasures::yes::*} to yml list "treasures.yes" from file "plugins/Skript/Cryptarch/TreasureTable.yml"
message "%{_alltreasures::*}%" to the player
if player has permission "destiny.class.hunter":
set {_treasure::yes::*} to yml list "treasure.yes.hunter" from file "plugins/Skript/Cryptarch/TreasureTable.yml"
set {_yes} to random object of {_treasure::*}
execute console command "mm items give %player% %{_yes}%"
stop
if player has permission "destiny.class.warlock":
set {_treasure::yes::*} to yml list "treasure.yes.warlock" from file "plugins/Skript/Cryptarch/TreasureTable.yml"
set {_yes} to random object of {_treasure::yes::*}
execute console command "mm items give %player% %{_posssible}%"
stop
if player has permission "destiny.class.titan":
set {_treasure::yes::*} to yml list "treasure.yes.titan" from file "plugins/Skript/Cryptarch/TreasureTable.yml"
set {_yes} to random object of {_treasure::yes::*}
execute console command "mm items give %player% %{_yes}%"
stop
chance of 50%:
if player has permission "destiny.hunter":
set {_treasure::possible::*} to yml list "treasure.maybe.hunter" from file "plugins/Skript/Cryptarch/TreasureTable.yml"
set {_possible} to random object of {_treasure::possible::*}
execute console command "mm items give %player% %{_possible}%"
stop
if player has permission "destiny.warlock":
set {_treasure::possible::*} to yml list "treasure.maybe.warlock" from file "plugins/Skript/Cryptarch/TreasureTable.yml"
set {_possible} to random object of {_treasure::possible::*}
execute console command "mm items give %player% %{_possible}%"
stop
if player has permission "destiny.titan":
set {_treasure::possible::*} to yml list "treasure.maybe.titan" from file "plugins/Skript/Cryptarch/TreasureTable.yml"
set {_possible} to random object of {_treasure::possible::*}
execute console command "mm items give %player% %{_possible}%"
stop
YML:
Code:
treasure:
maybe:
hunter:
- something
warlock:
- something
titan:
- something
no:
hunter:
- something
warlock:
- something
titan:
- something
yes:
hunter:
- something
warlock:
- something
titan:
- something