Skript: Player variable recognized as an item stack

Created on 29 Aug 2018  路  2Comments  路  Source: SkriptLang/Skript

Spigot : 1.12.2
Skript : last stable version - dev37c

When writing this code

function test(p: player):
    message "" to {_p}
    make console execute command "/give %{_p}% enchanted_book 1 0 {StoredEnchantments:[{id:49,lvl:2}]}"
    make console execute command "/give %{_p}% enchanted_book 1 0 {StoredEnchantments:[{id:48,lvl:2}]}"
    give 64 arrow to {_p}
    message "Hello" to {_p}

It says that the line that sends "Hello" to {_p} is not valid because "{_p} is an itemstack" but it is a player
And when sending all messages first, and then giving items to {_p}, like this

function test(p: player):
    message "" to {_p}
    message "Hello" to {_p}
    make console execute command "/give %{_p}% enchanted_book 1 0 {StoredEnchantments:[{id:49,lvl:2}]}"
    make console execute command "/give %{_p}% enchanted_book 1 0 {StoredEnchantments:[{id:48,lvl:2}]}"
    give 64 arrow to {_p}

It works.
Don't have more info on this bug

bug low

Most helpful comment

This is really weird. @Blueyescat confirmed it for me. Some devs are looking into it now but it's a pretty edge case. Thanks for the detailed info as well, we were able to reproduce it pretty immediately.

All 2 comments

This is really weird. @Blueyescat confirmed it for me. Some devs are looking into it now but it's a pretty edge case. Thanks for the detailed info as well, we were able to reproduce it pretty immediately.

This seems to have disappeared since 1.13 dev builds.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dhgameryt picture dhgameryt  路  3Comments

wohahobg picture wohahobg  路  3Comments

TheClassic36 picture TheClassic36  路  3Comments

cyanide43 picture cyanide43  路  4Comments

ghost picture ghost  路  3Comments