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

elgbar picture elgbar  路  57Comments

Raphy123 picture Raphy123  路  27Comments

StealWonders picture StealWonders  路  21Comments

Runakai1 picture Runakai1  路  27Comments

TheLimeGlass picture TheLimeGlass  路  26Comments