Skript-Mirror Help

  • 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!

Status
Not open for further replies.

AsuDev

VIP
Jan 27, 2017
241
22
18
24
United States
How can I set {_message} to the new format?

code_language.skript:
set {_message} to "!"

set {_message} to {_message}.replaceFirst("!", " "); #Doesn't Work gives error
{_message}.replaceFirst("!", " ");  #Works but doesn't change anything in {_message}

player.sendMessage({_message}.replaceFirst("!", " ")); #Does Work and shows the new change
 
How can I set {_message} to the new format?

code_language.skript:
set {_message} to "!"

set {_message} to {_message}.replaceFirst("!", " "); #Doesn't Work gives error
{_message}.replaceFirst("!", " ");  #Works but doesn't change anything in {_message}

player.sendMessage({_message}.replaceFirst("!", " ")); #Does Work and shows the new change


code_language.skript:
set {_message} to {_message}.replaceFirst("!", " ");
is correct but when using skript-mirror stuff as expressions you don't need a semi-colon at the end. Also skript-mirror is great for things that skript doesnt already have, but it is better to use default skript where possible
 
Status
Not open for further replies.