• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Can you do a line break when you send a message? (sendTextMessage)

Spoking

Oldschool Developer
Joined
Sep 4, 2007
Messages
434
Reaction score
34
Hey all :)

Can you do a line break when you send a message in game? (sendTextMessage)

I tried \n but that didn't work.

Thanks!
 
nope
you have to split it into 2
you can use an array though
example:
Lua:
local text = {"this", "is", "going", "to", "split"}

for i = 1, #text do
    player:sendTextMessage(MESSAGE_CONSOLE_STATUS_ORANGE, text[i])
end
 
Ah alright, that's a bummer. I wanted to have the text: "Congratulations! You've received a" .. itemname, but then have the itemname on a new line in the same message (when using message type advance for instance)

ah well thanks for the answer :)
 
I actually think it's posible, try to send \n and see what happens.
Im pretty sure I have seen this before where the next line dosn't contain the char name etc like this:
Code:
12:00 WibbenZ: .. text
12:00 text..

Something like that
 
oh i guess it does work
kE0GmmC.png

Lua:
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "test\nagain")
 
Back
Top