1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Skript-Mirror Help

Discussion in 'Skript' started by AsuDev, Apr 13, 2018.

Thread Status:
Not open for further replies.
  1. AsuDev

    VIP

    Joined:
    Jan 27, 2017
    Messages:
    243
    Likes Received:
    21
    How can I set {_message} to the new format?

    Code (Skript):
    1.  
    2.  
    3. set {_message} to "!"
    4.  
    5. set {_message} to {_message}.replaceFirst("!", " "); #Doesn't Work gives error
    6. {_message}.replaceFirst("!", " ");  #Works but doesn't change anything in {_message}
    7.  
    8. player.sendMessage({_message}.replaceFirst("!", " ")); #Does Work and shows the new change
    9.  
    10.  
     
  2. it_twit

    it_twit Member

    Joined:
    Jan 26, 2017
    Messages:
    37
    Likes Received:
    3
    Medals:

    Code (Skript):
    1. 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
     
Thread Status:
Not open for further replies.

Share This Page

Loading...