The skript gives no errors but when the command is run the items aren't in the chest that spawned.
command /chestspawn [<text>]:
trigger:
loop {%arg 1%::chest::*}: #the location of chest pos list
set block at loop-value to chest
set {_item-count} to random integer from 2 to 5
clear inventory of block at loop-value
loop {_item-count} times:
chance of 100%:
set {_item} to random element out of {sg.50::%arg 1%::*} #<list of items with only chain boots on it
add {_item} to inventory of block at loop-value #I assume it is something to do with this line ~~
send "%{_item}%" #debug item just tells me the item
send "%loop-value%" #debug chest location tells me the chest location
command /chestspawn [<text>]:
trigger:
loop {%arg 1%::chest::*}: #the location of chest pos list
set block at loop-value to chest
set {_item-count} to random integer from 2 to 5
clear inventory of block at loop-value
loop {_item-count} times:
chance of 100%:
set {_item} to random element out of {sg.50::%arg 1%::*} #<list of items with only chain boots on it
add {_item} to inventory of block at loop-value #I assume it is something to do with this line ~~
send "%{_item}%" #debug item just tells me the item
send "%loop-value%" #debug chest location tells me the chest location