Im tying to remove a variable amount of wheat seeds from the player, and i know i have enough. I even have too many wheat seeds in my inv. But its not removing the seeds when i click to buy a spawner. Its like not reading the variable amount i need. I says i dont have enough seeds. Does anyone know why? I havnt had this issue before.
Thanks!
~Matt
[doublepost=1602427485,1602275036][/doublepost]bump
Thanks!
~Matt
Code:
variables:
{chicken::skull::cost} = 500
on inventory click:
if name of player's current inventory contains "&c&lSkull Trader":
cancel event
if index of event-slot is 36:
if amount of wheat seeds in player's inventory >= {chicken::skull::cost} parsed as number:
remove {chicken::skull::cost} of wheat seeds from player's inventory
set {spawner::9::%player%} to true
send "&aYou bought a Chicken spawner!"
execute console command "us givespawner %player% CHICKEN"
else:
close player's inventory
send "&cYou dont have enough wheat seeds to trade!"