Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when trying to remove an item from a player within a function. #3231

Closed
Blacksoul16 opened this issue Jul 27, 2020 · 1 comment
Closed
Labels
duplicate For bugs or requests that have already been made and are currently open.

Comments

@Blacksoul16
Copy link

Description

When I want to remove 1 item from a player's inventory in a function using "{_p}'s tool" doesn't work, but "tool of {_p}" does.

Steps to Reproduce

function test(p: player):
    remove 1 of tool of {_p} from {_p}'s inventory    ← Work
  #----- 
    remove 1 of {_p}'s tool from {_p}'s inventory    ← Doesn't work

on rightclick holding red dye:
    cancel event
    test(player)

Expected Behavior

This should remove the item from the inventory, regardless of the expression used.

Errors / Screenshots

https://pastebin.com/F0mnancm

Server Information

  • Server version/platform: git-Paper-243 (MC: 1.14.4)
  • Skript version: 2.5-alpha5

Additional Context

In alpha6 it also happens and with worse errors, like this #3185 .

@TPGamesNL
Copy link
Member

TPGamesNL commented Mar 22, 2021

Duplicate of #3814 (closing this one as #3814 contains more information). For that code you can use remove 1 of ({_p}'s tool) from {_p}'s inventory, which should temporarily fix it (or just the first version you wrote).

@TPGamesNL TPGamesNL marked this as a duplicate of #3814 Mar 22, 2021
@TPGamesNL TPGamesNL added the duplicate For bugs or requests that have already been made and are currently open. label Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate For bugs or requests that have already been made and are currently open.
Projects
None yet
Development

No branches or pull requests

2 participants