Skript/Server Version
[12:35:04 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[12:35:04 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[12:35:04 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[12:35:04 INFO]: [Skript] Server Version: 26.1.2-74-e4e17fc (MC: 26.1.2)
[12:35:04 INFO]: [Skript] Skript Version: 2.16.1 (skriptlang-github)
[12:35:04 INFO]: [Skript] Installed Skript Addons:
[12:35:04 INFO]: [Skript] - skript-placeholders v1.7.1 (https://github.com/APickledWalrus/skript-placeholders)
[12:35:04 INFO]: [Skript] - DiSky v4.29.0
[12:35:04 INFO]: [Skript] - skript-reflect v2.6.3 (https://github.com/SkriptLang/skript-reflect)
[12:35:04 INFO]: [Skript] - Lusk v1.3.14 (https://github.com/JakeGBLP/Lusk)
[12:35:04 INFO]: [Skript] - SkBee v3.25.3 (https://github.com/ShaneBeee/SkBee)
[12:35:04 INFO]: [Skript] - Skonic v1.2.8
[12:35:04 INFO]: [Skript] Installed dependencies:
[12:35:04 INFO]: [Skript] - Vault v1.7.3-b131
[12:35:04 INFO]: [Skript] - WorldGuard v7.0.17+2370-e42d8bc
[12:35:04 INFO]: [Skript] - GriefPrevention v16.18.7
/
Bug Description
Passing formatted item names in functions makes it so the passed text can't be checked correctly anymore.
In the following code, with an item named "&bTest", only "yes 1" will run. "yes 2" won't:
command /test:
trigger:
send player's held item
if player's held item's name = "&bTest":
send "&ayes 1"
test(player's held item's name)
function test(name: text):
broadcast {_name}
if {_name} = "&bTest":
broadcast "&ayes 2"
When removing "&b" in the code and in-game item's name, it works correctly.
Expected Behavior
The item name should also be able to be found correctly inside the function since they both match.
Steps to Reproduce
Pass a formatted item name in a function and check the name outside and inside the function.
The following code can be used:
command /test:
trigger:
send player's held item
if player's held item's name = "&bTest":
send "&ayes 1"
test(player's held item's name)
function test(name: text):
broadcast {_name}
if {_name} = "&bTest":
broadcast "&ayes 2"
Errors or Screenshots
Other
No response
Agreement
Skript/Server Version
Bug Description
Passing formatted item names in functions makes it so the passed text can't be checked correctly anymore.
In the following code, with an item named "&bTest", only "yes 1" will run. "yes 2" won't:
command /test:
trigger:
send player's held item
if player's held item's name = "&bTest":
send "&ayes 1"
function test(name: text):
broadcast {_name}
When removing "&b" in the code and in-game item's name, it works correctly.
Expected Behavior
The item name should also be able to be found correctly inside the function since they both match.
Steps to Reproduce
Pass a formatted item name in a function and check the name outside and inside the function.
The following code can be used:
command /test:
trigger:
send player's held item
if player's held item's name = "&bTest":
send "&ayes 1"
function test(name: text):
broadcast {_name}
Errors or Screenshots
Other
No response
Agreement