Solved New Line question for json.sk

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

Wynnevir

Well-Known Member
Jul 9, 2017
1,015
62
48
30
Elsewhere
I've been trying a few different versions of skript to get the %new line% expression in any of its variations to work in tooltip. It's on a 1.15.2 server, but regardless of version it cant understand the new line expression on reload.
Does anyone know if there is a version that works,a workaround or if it just doesn't work at all for now?
 
I've been trying a few different versions of skript to get the %new line% expression in any of its variations to work in tooltip. It's on a 1.15.2 server, but regardless of version it cant understand the new line expression on reload.
Does anyone know if there is a version that works,a workaround or if it just doesn't work at all for now?
It works normally, as long as you use Skripts tooltips: https://skriptlang.github.io/Skript/text.html (not using json.sk)
 
I've been trying a few different versions of skript to get the %new line% expression in any of its variations to work in tooltip. It's on a 1.15.2 server, but regardless of version it cant understand the new line expression on reload.
Does anyone know if there is a version that works,a workaround or if it just doesn't work at all for now?
new line expression was introduced in Skript 2.5, for older versions either install SkQuery or use Skript-mirror.
 
I do have SkQuery, and its up to date. though ive tried other versions too. as soon as I add the %newline% expression it reloads without errors, but stops sending
I get either white space errors in console or incorrect argument errors.
Specifically, argument errors for %nl% and white space errors for %newline% and %new line%

Regular skript's tooltips don't support variables, which is the only reason why im not using them.
Code:
01.05 16:03:31 [Server] Server thread/INFO Cymmerii issued server command: /sk reload test
01.05 16:03:33 [Server] Server thread/INFO Expected whitespace to end one argument, but found trailing data
01.05 16:03:33 [Server] Server thread/INFO ...":[{"text":"Cymmerii §r","hoverEvent":{"action": "show_text","value": "Line1
01.05 16:03:33 [Server] INFO line2"}},{"text":"§r§7t"}]}<--[HERE]
01.05 16:04:29 [Server] Server thread/INFO Cymmerii issued server command: /sk reload test
01.05 16:05:15 [Server] Server thread/INFO Cymmerii issued server command: /sk reload test
01.05 16:05:16 [Server] Server thread/INFO Expected whitespace to end one argument, but found trailing data
01.05 16:05:16 [Server] Server thread/INFO ...:[{"text":"Cymmerii §r","hoverEvent":{"action": "show_text","value": "Line1
01.05 16:05:16 [Server] INFO line2"}},{"text":"§r§7tt"}]}<--[HERE]
Edit: The code as well, it works so long as the "%newline% bit is gone:emoji_frowning:
Code:
on chat:
    clear chat recipients
    loop all players:
        json("%loop-value%","%player's display name% ||ttp:Line1%newline%Line2||&7%message%")
 
I do have SkQuery, and its up to date. though ive tried other versions too. as soon as I add the %newline% expression it reloads without errors, but stops sending
I get either white space errors in console or incorrect argument errors.
Specifically, argument errors for %nl% and white space errors for %newline% and %new line%

Regular skript's tooltips don't support variables, which is the only reason why im not using them.
Code:
01.05 16:03:31 [Server] Server thread/INFO Cymmerii issued server command: /sk reload test
01.05 16:03:33 [Server] Server thread/INFO Expected whitespace to end one argument, but found trailing data
01.05 16:03:33 [Server] Server thread/INFO ...":[{"text":"Cymmerii §r","hoverEvent":{"action": "show_text","value": "Line1
01.05 16:03:33 [Server] INFO line2"}},{"text":"§r§7t"}]}<--[HERE]
01.05 16:04:29 [Server] Server thread/INFO Cymmerii issued server command: /sk reload test
01.05 16:05:15 [Server] Server thread/INFO Cymmerii issued server command: /sk reload test
01.05 16:05:16 [Server] Server thread/INFO Expected whitespace to end one argument, but found trailing data
01.05 16:05:16 [Server] Server thread/INFO ...:[{"text":"Cymmerii §r","hoverEvent":{"action": "show_text","value": "Line1
01.05 16:05:16 [Server] INFO line2"}},{"text":"§r§7tt"}]}<--[HERE]
Edit: The code as well, it works so long as the "%newline% bit is gone:emoji_frowning:
Code:
on chat:
    clear chat recipients
    loop all players:
        json("%loop-value%","%player's display name% ||ttp:Line1%newline%Line2||&7%message%")
Skript tooltips do support variables, you just have to use send formatted instead of just send.
 
Status
Not open for further replies.