Code:
PlayerEventClickMenuSlot
IfGameEventItemEquals(Shears)
{
IfVariable(%default money >= 100)
{
PlayerActionGiveItems(Shears)
SetVariableSubtract(%default money, 100)
}
}
else
{
PlayerActionSendMessage("&cNot enough coins!")
PlayerActionPlaySound(Experience Orb Pickup)
}
If you don't have enough money the code will correctly print out the message and play the sound. However, if you do have enough money the code will give you the shears but not subtract money from your total and I'm not sure why. Does anyone know why my code doesn't work?