So, I'm trying to create a server that gives you a random block out of some blocks every 10 seconds. Here is my code:
My error is that it says "Former is neither an item type..."
If you can hel please reply
Code:
on join:
execute console command "/mvtp %player% game"
function all(obj: item):
loop all players:
give loop-player 1 {_obj}
every 10 seconds:
set {_g} to true
chance of 20%:
if {_g} is true:
set {_g} to false
all(cobblestone)
chance of 15%:
if {_g} is true:
set {_g} to false
all(dirt)
chance of 10%:
if {_g} is true:
set {_g} to false
all(coal)
chance of 5%:
if {_g} is true:
set {_g} to false
all(iron ore)
if {_g} is true:
all(cobblestone)
My error is that it says "Former is neither an item type..."
If you can hel please reply