Solved Cannot find YML path

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

infered5

New Member
Mar 12, 2017
5
0
1
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.
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
 
Code:
[LIST=1]
[*]  yes:
[*]    warlock:
[*]      - something
[/LIST]

missing spaces.
 
Code:
[LIST=1]
[*]  yes:
[*]    warlock:
[*]      - something
[/LIST]

missing spaces.

Adjusting the YAML to:
Code:
treasure:
    maybe:
        hunter:
        - something
        warlock:
        - something
        titan:
        - something
    yes:
        hunter:
        - something
        warlock:
        - something
        titan:
        - something

No change.
 
Adjusting the YAML to:
Code:
treasure:
    maybe:
        hunter:
        - something
        warlock:
        - something
        titan:
        - something
    yes:
        hunter:
        - something
        warlock:
        - something
        titan:
        - something

No change.
You need space after the -

So like this

Code:
treasure:
    maybe:
        hunter:
          - something
        warlock:
          - something
        titan:
          -something
    yes:
        hunter:
          - something
        warlock:
          - something
        titan:
          - something
 
You need space after the -

So like this

Code:
treasure:
    maybe:
        hunter:
          - something
        warlock:
          - something
        titan:
          -something
    yes:
        hunter:
          - something
        warlock:
          - something
        titan:
          - something

Didn't work for some reason. I have an excerpt from my other drop table:

Code:
guns:
  common:
  - MarshalA1
  - MarshalA
  - SaharaAR2
  - GalahadB

The above droptable works fine, so I'm not sure why it's not finding it.
 
Status
Not open for further replies.