I have this function for a shop but its always saying the player doesnt have the items needed even when they do
i have no idea why that doesnt work because same exact thing works as a command:
im running spigot 1.12 and skript dev29
code_language.skript:
function test(p: player, item: item, cost: item):
if {_p}'s inventory contains {_cost}:
remove {_cost} from {_p}'s inventory
give {_p} {_item}
else:
broadcast "nope"
command /test:
trigger:
test(player, 5 diamonds, 5 dirt)
code_language.skript:
command /test <player> <item> <item>:
trigger:
if arg-1's inventory contains arg-3:
remove arg-3 from arg-1's inventory
give arg-1 arg-2
else:
broadcast "nope"