Solved if amount of {VARİABLE}

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Yaşarhan

Active Member
May 16, 2020
87
6
8
23
Turkey Istanbul
Welcome, I have a little problem, this check does not work when I use variable instead of item name.

No error.

Code:
if amount of {itemtype.%player%} in player's inventory is greater than or equal to arg 1:

Thanks.
[doublepost=1611836728,1611796799][/doublepost]Is it that hard ?
 
I assume you dont speak english:
Code:
if {variable} is equal to the amount of items in player's inventory:
is this what you mean?
 
I assume you dont speak english:
Code:
if {variable} is equal to the amount of items in player's inventory:
is this what you mean?

Thanks and no, I can get the quantity using arg 1, I want to get the item type with variable.
[doublepost=1611846638,1611845459][/doublepost]
I assume you dont speak english:
Code:
if {variable} is equal to the amount of items in player's inventory:
is this what you mean?

Code:
if amount of nether star in player's inventory is greater than or equal to arg 1:

For example, works when the item name is typed directly, I want to execute the item name using a variable.
 
But what did you set {itemtype.%player%} to?

The value in it gives exactly "nether star", there is no problem there.
[doublepost=1611915210,1611855747][/doublepost]Thanks, i fixed the problem, i will share it soon.
[doublepost=1611932596][/doublepost]I solved the problem:

Code:
set {_type} to {itemtype.%player%} named "%{itemname.%player%}%"
if amount of {_type} in player's inventory is greater than or equal to arg 1:
 
Status
Not open for further replies.