Hi, I am trying to do a skript that loops items in player's inventory and then it adds it to a yml file. The problem is that when I reload my skript, an error appears saying "Can't understand this type of loop: "loop all items in player's inventory", etc". First I did something like this and I made a test using different items (incluiding potions)
but when I see the yaml file...
When I used a command to get these items, I got a water bottle but not a potion
Skript Version: Skript 2.2 (dev31) [Latest]
Skript Author: Dzikoysk
Minecraft Version: 1.12.1 [Running with latest spigot build]ç
After that I tried to do the same thing but with a loop. And I wrote this:
So, I need a way to make the loop or to fix the potion error.
code_language.skript:
loop 36 times:
set {_call} to slot {_count} of player's inventory
if {_call} is not air:
add "%{_call}%" to skutil yaml list "items" from file "{@file}"
add 1 to {_count}
code_language.skript:
items:
- diamond_sword of Mending 1
- grass_block
- enchanted_book
- spawn_egg
- '145'
- bottle_o'_enchanting
- water_bottle # This is the potion, it appears as a water bottle
Skript Version: Skript 2.2 (dev31) [Latest]
Skript Author: Dzikoysk
Minecraft Version: 1.12.1 [Running with latest spigot build]ç
After that I tried to do the same thing but with a loop. And I wrote this:
code_language.skript:
command /invtest:
trigger:
loop all items in player's inventory:
loop-item is not air
add "%loop-item%" to skutil yaml list "test" from file "/plugins/KITS/sostupid.yml"