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

How to create lines in strings? [closed]

Asked by 9 years ago

I wanted to know how if possible I could add another line to a string, like as follows:

String  = "BSIncorporated has
killed Bluemonkey132"

Just an example

Try ( )? lucas4114 607 — 9y

Locked by BSIncorporated, Redbullusa, and dyler3

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

2 answers

Log in to vote
Answered by
Merely 2122 Moderation Voter Community Moderator
9 years ago
String  = "BSIncorporated has \n killed Bluemonkey132"
You can also use Brackets to do this as well. TheeDeathCaster 2368 — 9y
Log in to vote
Answered by 9 years ago

Lua supports the following methods for creating string literals:

s = "Double quotation, \n Next Line"
s = 'Single quote, \n Next Line'
s = [[ Multi line
string, carries across editor new lines]]
s = [==[ You can also nest these like this, and [[ this won't]] end
The string]==]
s = [=====[As long as you match up the number of
= signs
between the brackets, it will work.]=====]
Wth is up with the points... dyler3 1510 — 9y