I want to confirm on the second line that the player has the item and I have enough items on me, but it still judges it as not having it
I have confirmed that the contents of {_item} and the items in my backpack are "cobblestone block"
I have confirmed that the contents of {_item} and the items in my backpack are "cobblestone block"
Code:
function money(p: player, n: number, item: item, price: number):
{_p} has {_n} of {_item}: ←here
remove {_n} of {_item} from {_p}
add {_price} to money of {_p}
else:
send "you don't have enough items" to {_p}
play sound "block.note_block.pling" with volume 2 and pitch 0.5 to {_p}
on inventory click:
name of event-inventory is "menu":
cancel event
set {_item1} to type of event-item
index of event-slot = 0:
money(player, 1, {_item1}, 0.5)
Last edited: