Solved Forcing someone to send a character via Skript kicks them, but sending it in chat doesn't.

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Chickenman

Member
Jul 30, 2021
10
0
1
35
Hi! I've been developing a server, (the details aren't important) and in that server I want to have an item that sends the message "I forgor ☠". In game, the emoji looks like this:
1691688748498.png
. However, when I use Skript to force me to say it: make player say "&cI forgor ☠", it kicks me from the server with
the error: You were kicked from [server]: Illegal characters in chat. To reiterate, this works when pasted into the Minecraft chat, but not when used with Skript. I use a separate script which allows you to use the "&" symbol to change colours in chat, so it's the exact same. If you need it I will send that script. I've no idea why this isn't working, and since I can't find anything online that would explain this, I am posting this thread. Sorry if this is a bit too much text, and even if you don't know how to fix it, thanks for trying and have a good day =D
 
This is caused by the '&c' character in the code most likely, as Minecraft does not like the character it gets replaced with when it becomes the color. There's honestly no real good way to fix it but the easiest is to set a var to the message and colour it example of how is below

AppleScript:
set {_message} to colored message
replace all "§" with "&" in {_message}
set message to {_message}
 
This is caused by the '&c' character in the code most likely, as Minecraft does not like the character it gets replaced with when it becomes the color. There's honestly no real good way to fix it but the easiest is to set a var to the message and colour it example of how is below

AppleScript:
set {_message} to colored message
replace all "§" with "&" in {_message}
set message to {_message}
Thanks, I'll try to implement this in a moment.
 
This is caused by the '&c' character in the code most likely, as Minecraft does not like the character it gets replaced with when it becomes the color. There's honestly no real good way to fix it but the easiest is to set a var to the message and colour it example of how is below

AppleScript:
set {_message} to colored message
replace all "§" with "&" in {_message}
set message to {_message}
This information really helped, and while I haven't taken the time to implement the code you gave me, the reason for the error is super helpful and now it at least works at all.