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

on drop event not returning correct data type #2151

Closed
Wealthyturtle opened this issue Jun 10, 2019 · 2 comments
Closed

on drop event not returning correct data type #2151

Wealthyturtle opened this issue Jun 10, 2019 · 2 comments
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@Wealthyturtle
Copy link
Member

Wealthyturtle commented Jun 10, 2019

Description

on drop event seems to not be returning an item stack, even though the event value is called event-itemstack

Steps to Reproduce

function f(i: item) :: string:
    return name of {_i}

on drop:
    send f(event-itemstack)

Expected Behavior

event-itemstack should be of data type item stack

Errors / Screenshots

Line 5: The 1st argument given to the function 'f' is not of the required type item stack. Check the correct order of the arguments and put lists into parentheses if appropriate (e.g. 'give(player, (iron ore and gold ore))'). Please note that storing the value in a variable and then using that variable as parameter will suppress this error, but it still won't work. (test.sk, line 5: send f(event-itemstack)')

Server Information

  • Server version/platform: Spigot 1.14.2
  • Skript version: 2.4.1-alpha3
@TheBentoBox TheBentoBox added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: low Issues that are not harmful to the experience but are related to useful changes or additions. labels Jun 11, 2019
@TheBentoBox
Copy link
Member

There might be a workaround for this but it is at the very least misleading.

@Wealthyturtle
Copy link
Member Author

Just realised this issue would be fixed by #2510

@Wealthyturtle Wealthyturtle added the completed The issue has been fully resolved and the change will be in the next Skript update. label Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.
Projects
None yet
Development

No branches or pull requests

2 participants