#Distinguish named and unnamed items

1 messages · Page 1 of 1 (latest)

half axle
#

Hi, I currently have a requirement where I need to remove the total amount of an item from an inventory. The issue popped up that it also takes into account the named items. But I dont want that. Only unnamed items can be sold.

Code:

set {_amount} to amount of feather named "" in player's inventory #-- select the amount of unnamed feathers in an inv
remove {_amount} of feather named "" from player's inventory #-- remove that amount

Output: 64x feather and 64x feather named "test" in inventory

128 feathers have been removed```

Check PR:
- https://github.com/SkriptLang/Skript/pull/3960
- https://github.com/SkriptLang/Skript/pull/3419

Issues:
- https://github.com/SkriptLang/Skript/issues/3405

Issue seemed to be solved as state in the PRs. However, in skript 2.6.3 it's still removing all feathers, including the named ones. Anyone has an idea how to fix?
half axle
#

Bump

quaint plank
#

The unnamed items are not named at all
so their name is not "", it's just nothing (might be wrong on that)
But regardless, you can try to use a filter so it excludes the items whose name is set
so something like where [input's name is set]

half axle
#

Lambda error i think, but ill retry when home!

half axle
#

Did not work but looped inv and substracted amount of named items from amount of unnamed

half axle
#

A day

#

Ish

dense scroll
#

stfu im blind

#

im leaving