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

Color reset after a variable #2319

Closed
ilsubyeega opened this issue Jul 31, 2019 · 7 comments
Closed

Color reset after a variable #2319

ilsubyeega opened this issue Jul 31, 2019 · 7 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: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).

Comments

@ilsubyeega
Copy link

Description

The color of the text after the variable is getting reset.

Steps to Reproduce

command vvv:
	trigger:
		set {_method} to "CB"
		message "&aABC %{_method}% AAA"
		message "&aABC %{_method}% &aAAA"

run command /vvv and you will get messaged with
"&aABC CB&r AAA"
"&aABC CB &aAAA"

Expected Behavior

First line should be "&aABC CB AAA" not "&aABC CB&r AAA"

Errors / Screenshots

Video: https://youtu.be/TVC1BoIa63U
Screenshot:
https://imgur.com/a/DXkjOz7

Server Information

  • Server version/platform: git-Paper-1618 (MC: 1.12.2)
  • Skript version: 2.4-beta4
@bensku bensku 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 Aug 4, 2019
@bensku
Copy link
Member

bensku commented Aug 4, 2019

Some more fallout from chat security updates. Implementing this is unfortunately not trivial.

@aescraftbr
Copy link

aescraftbr commented Aug 5, 2019

Looks like it's a two way issue:

The color, if set by a coloured variable, won't be reseted after the variable, EVEN if you use &r or §r to reset it.

command /testcolorerror:
  trigger:
    set {_X} to colored "&1XXX"
    set {_Y} to colored "&2XXX"
    set {_Z} to colored "&3XXX"
    message "| %{_X}% §r| %{_Y}% §r| %{_Z}%"

The first "|" will not be coloured
But the second "|" will have the {_X}'s colour, and the third "|" will have the {_Y}'s colour, even with the &r (reset) code.

Others confirm:
error

@iOshawott
Copy link

Oh my god, all my skripts needs to be redone because of this ;-;

@FranKusmiruk
Copy link
Member

@aescraftbr just to be sure, can this be tested using Skript's chat codes (i.e.: <reset>) instead of raw format?

@bensku bensku added priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation). and removed priority: low Issues that are not harmful to the experience but are related to useful changes or additions. labels Sep 1, 2019
@Matocolotoe
Copy link
Contributor

Please fix this...

@ghost
Copy link

ghost commented Dec 29, 2019

Please fix this...

you can use workaround:
send formatted "message"
instead of normal send, or send colored if you don't need format.

@Matocolotoe
Copy link
Contributor

Matocolotoe commented Dec 29, 2019

Thank you so much !

@TPGamesNL TPGamesNL added PR available Issues which have a yet-to-be merged PR resolving it completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Aug 14, 2021
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: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).
Projects
None yet
Development

No branches or pull requests

8 participants