Hey, ich wanted to check if a player has an Item in his inventory.
The Problem is: The Item i search in his inventory is a variable. I want to search an item which i didnt set in the script. I want to set the item ingame with a variable but it says "'1 {item}' is not an entity type (myscript.sk, line 31: if player has 1 {item}:')"
heres the part of the script
Sorry for my bad english btw
The Problem is: The Item i search in his inventory is a variable. I want to search an item which i didnt set in the script. I want to set the item ingame with a variable but it says "'1 {item}' is not an entity type (myscript.sk, line 31: if player has 1 {item}:')"
heres the part of the script
Code:
command /buythatshit [<integer>]:
trigger:
if arg-1 is set:
if arg-1 is bigger than 14:
stop
if arg-1 is smaller than 1:
stop
if player has 1 {verkaufstimes.%arg-1%}:
remove 1 {verkaufstimes.%arg-1%} from player
message "&7Du hast &c1x &b%{verkaufstimes.%arg-1%}% &7verkauft! &a+%{preis.verkaufstimes.%arg-1%}%"
add {preis.verkaufsitems.%arg-1%} to {tokens.%player%}
stop
else:
message "&cDu hast dieses Item nicht im Inventar!"
Sorry for my bad english btw