I am trying to make a simple shop skript so when you buy an item it removes a specified price of coal (in this case) from your inventory.
But it doesn't work.
ERROR:
{pickcost::*} amount of coal can't be removed from an inventory because the former is neither an item type nor an inventory
NOTE: It worked when it was just a number of coal, not a variable of coal.
But it doesn't work.
Code:
on inventory click:
if name of event-inventory is "&8Are you sure?":
if event-item is lime wool:
close player's inventory
cancel event
remove {pickcost::*} coal from player's inventory # <- the problematic line
add 1 to {pick::*}
set {nextpick::*} to {pick::*}
add 1 to {nextpick::*}
play sound "entity.experience_orb.pickup" to player
send "&aYou successfully upgraded your pickaxe to tier&2 %amount of {pick::*}%&7."
ERROR:
{pickcost::*} amount of coal can't be removed from an inventory because the former is neither an item type nor an inventory
NOTE: It worked when it was just a number of coal, not a variable of coal.