Solved Removing named items from player's inventory

  • 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.

BradlyKG

Member
May 2, 2017
3
0
0
37
I'm not sure what I'm doing wrong here. I'm hoping someone can shed some light because I'm completely lost as to why this is not working.

Code:
on right click on furnace:
    name of player's held item is "&5Carbon"
    cancel event
    remove charcoal named "&5Carbon" from player's inventory

It's not removing the item when it's named. When I omit the name from the remove event, it works just fine. But I don't want it to remove just any charcoal, only the named one.

I've tried all the variations of "correct" ways it could be done as well. There's got to be something I'm missing. No errors, and it does everything except remove the charcoal. Any help is greatly appreciated.
 
Last edited:
Can't you do that in this way?
code_language.skript:
on right click on furnace:
    name of player's held item is "&5Carbon"
    cancel the event
    remove player's held item from player's inventory
 
Status
Not open for further replies.