Line breaks #4017
Replies: 2 comments
-
skript-parser adds a token ('\') for this. If the end of the line matches this token, the next line is pasted behind it, and so on until there is a statement that has less indentation or doesn't end with the token. While your particular suggestion makes it way easier, I doubt that this can be added easily, since you'd need to do this pre-parsing. I suppose you could parse a line, and if it can't be parsed, add the next line to it and try again, and so on, but wouldn't that slow the parsing down by a lot? I mean if you have a trigger/section with many statements, this would become very slow. |
Beta Was this translation helpful? Give feedback.
-
I am not too sure what to feel when given a more real use case, how would we deal with indentation? Would we prefer: command /help:
trigger:
open chest inventory named "Help" with 3 rows to player
add integers from 0 to 8, 9, 17, integers from 18 to 26 to {_borders::*}
set slot {_borders::*} of player's open inventory to stained glass pane named ""
set slot 10 of player's open inventory to stone with lore "<bold><yellow>Click here if you want to see more " +
"about the server's info", "<bold><yellow>make sure to not forget to look at our forums!" +
and "<link:https://myserver.com/forums>Click here" named "<brown>Info"
play sound "minecraft:" +
"villager_happy" to all players with pitch 1 and volume 1 Or: command /help:
trigger:
open chest inventory named "Help" with 3 rows to player
add integers from 0 to 8, 9, 17, integers from 18 to 26 to {_borders::*}
set slot {_borders::*} of player's open inventory to stained glass pane named ""
set slot 10 of player's open inventory to stone with lore "<bold><yellow>Click here if you want to see more " +
"about the server's info", "<bold><yellow>make sure to" +
" not forget to look at our forums!" +
and "<link:https://myserver.com/forums>Click here" +
named "<brown>Info"
play sound "minecraft:" +
"villager_happy" to all players with pitch 1 and volume 1 Neither way looks normal to my opinion but at this point, I am fine with either |
Beta Was this translation helpful? Give feedback.
-
Have Skript determine a line break.
Also introduces Arithmetic for Strings from #3975
Beta Was this translation helpful? Give feedback.
All reactions