Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Making empty lines using only one print() function?

Asked by 6 years ago
Edited 6 years ago

For example, I want to print something like this in the output:

The following is just an example:

How's your day?

As you can see, there's an empty line in the middle, how do you actually do that in lua? And no, I don't want to use print("") to make an empty line. I want to print all of that out in just a single print("The following ... day?")

2 answers

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

Hey anphu04,

Hey, anphu04, I finally understand what you are trying to do. You just need to use escape characters. It's very easy to make you go to the other line with this. Basically, all you need to type is \n inside of the string, here is an example of how this works.

print("The following is an example:\n\nHow's your day?")

Well, I hope I helped and have a nice day.

~~ KingLoneCat

0
But I thought I said empty lines and not empty space? Konethorix 197 — 6y
0
Ohhh KingLoneCat 2642 — 6y
Ad
Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

I haven’t tested this and I don’t even know if print is supposed to work this way, but you can try something like this :

print(“The following is an example :

        My day is good, thank you.”)

My code may look weird since I typed this on mobile, but you can put the first text in, press enter two times, then put the other text and finish it off with a ) .

Answer this question