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.

Solved Hello, all, I've got a Skript Issue, and help would be much obliged.

Discussion in 'Skript' started by Speed, Aug 28, 2017.

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

    Speed New Member

    Joined:
    Aug 2, 2017
    Messages:
    6
    Likes Received:
    0
    So, basically, I'm converting most of my plugins to Skript, and, while converting my MOTD plugin, I found out that the MOTD looked different on different computers, and that was because I was using spaces only. So, I'm switching it to %nl%, instead, but, for some reason, it shows up as a character, in the MOTD.

    The Code Goes As Follows:

    Code (Skript):
    1. &7                         &a&lTest&b&lCraft&r%nl%                  &6&lNEWS: &c&lAlpha &bReleased!
    This Is What It Shows In Game:

    [​IMG]

    Is there any way to remove that?

    Otherwise, it looks like this on one PC:

    [​IMG]

    And, like this, on another:

    [​IMG]

    With this code:

    Code (Skript):
    1. &7                         &a&lTest&b&lCraft&r                  &6&lNEWS: &c&lAlpha &bReleased!
    Anyways, thanks!
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Try using the following instead of the new line expression (needs skUtilties):
    Code (Skript):
    1. system property line separator
    you can put it in a variable just to make it shorter to write:
    Code (Skript):
    1. set {_nl} to system property line separator
     
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Got the same error:
    [​IMG]
     
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Just use \n as Spigot setMotd supports that.
     
  5. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Code (Skript):
    1. 7                         &a&lTest&b&lCraft&r \n                  &6&lNEWS: &c&lAlpha &bReleased!
    [​IMG]

    Still doesn't work for me, am I doing it wrong, or?..
     
  6. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Hmm strange. Skript changes it then. Are you using a yaml system or something to use the new line? or options or something. Try setting it to a variable

    Code (Skript):
    1. set {motd} to "this testing%nl%hmm"
    2.  
    3. on server ping:
    4.     set motd to {motd}
     
  7. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    What about using new line in messages? (I'm using your SkQuery Fork for 1.12.1)
     
  8. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    I use nl all the time in more, and I get this sometimes, usally it's because there is a tab in the string or something, but it always fixed itself after tweaking it a little. Idk the exact reason why it happens yet. It must be something with the server or your editor that does this.
     
  9. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Although the new line functionality, itself, works, it still shows the same symbol.

    [​IMG]
     
    #9 ShaneBee, Aug 28, 2017
    Last edited by a moderator: Aug 28, 2017
  10. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    still got the same error
     
  11. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Anyone?
    --- Double Post Merged, Sep 2, 2017, Original Post Date: Aug 31, 2017 ---
    Ok, so I figured it out. You have to use "%last character of nl%" instead of "%nl%." Idk why it works, but it does.
     
    • Winner Winner x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...