Skip to content

Formatting issue when passing text between "" to a function #8680

@MrMarshOfficial

Description

@MrMarshOfficial

Skript/Server Version

[20:18:44 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[20:18:44 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[20:18:44 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[20:18:44 INFO]: [Skript] Server Version: 26.1.2-60-b4682bf (MC: 26.1.2)
[20:18:44 INFO]: [Skript] Skript Version: 2.15.3 (skriptlang-github)
[20:18:44 INFO]: [Skript] Installed Skript Addons: 
[20:18:44 INFO]: [Skript]  - skript-placeholders v1.7.1 (https://github.com/APickledWalrus/skript-placeholders)
[20:18:44 INFO]: [Skript]  - DiSky v4.29.0
[20:18:44 INFO]: [Skript]  - skript-reflect v2.6.3 (https://github.com/SkriptLang/skript-reflect)
[20:18:44 INFO]: [Skript]  - SkBee v3.24.0 (https://github.com/ShaneBeee/SkBee)
[20:18:44 INFO]: [Skript]  - Skonic v1.2.8
[20:18:44 INFO]: [Skript] Installed dependencies: 
[20:18:44 INFO]: [Skript]  - Vault v1.7.3-b131
[20:18:44 INFO]: [Skript]  - WorldGuard v7.0.17+2370-e42d8bc
[20:18:44 INFO]: [Skript]  - GriefPrevention v16.18.7

Bug Description

Updating Skript from version 2.14.2 to 2.15.2 introduces a bug where passing formatted text (all legacy color codes?) between "" to a function is not being received correctly.

The example code below will not format the text correctly inside the function (no &l, bold):

command /test:
	trigger:
		open chest inventory with 1 row named "test" to player
		set slot 0 of player's current inventory to diamond named "&a&lTest"


on inventory click:
	event-inventory's name = "test"

	cancel event
	send event-item's name
	test(player, "%event-item's name% 1")


function test(p: player, test: text):
	send {_test} to {_p}

Expected Behavior

The formatted text should show correctly, in bold.

Steps to Reproduce

Use the example code I sent above.

Errors or Screenshots

Image

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    PR availableIssues which have a yet-to-be merged PR resolving itbugAn issue that needs to be fixed. Alternatively, a PR fixing an issue.priority: mediumIssues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).

    Type

    No type

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions