Author Topic: Can't figure out how to make a new line  (Read 604 times)

Bassically i'm an uber noob to making messages and I can't figure out how to make a new line.

i've tried NL or \n, but I don't think i'm doing it correctly.

example:
%client.chatmessage("This is a text NL this is a new line");

thanks in advance.

You close the quotes then do NL , or you can just type \n (backslash-n) without closing them.

You close the quotes then do NL , or you can just type \n (backslash-n) without closing them.
oh wait i was doing /n instead of \n, whoops.

alright so i tried \n and it won't work, I also tried
%client.chatmessage("this is a text."NL"this is a new line.");

and nothing happend.

you need to connect the strings to the operators/variables

%client.chatmessage("this is a text." @ NL @ "this is a new line.");

also available is SPC which is equivalent of @ " " @

this is also how you embed variables in strings:

messageAll('', "hi there" SPC %client.getPlayerName() @ "!");
gives you
hi there Wound!
« Last Edit: August 17, 2012, 06:49:33 PM by Lugnut »

okay now it won't even show up when i do /server or /rules.

function servercmdserver(%client)
{
   %client.chatmessage("\c6You are currently in Wound's server.");
}

function servercmdrules(%client)
{
   %client.chatmessage("\c4Do not forget around with the admins, that punishment will end in that admin's choice." @ NL @ "\c4You may not build off a baseplate, every once in a while an admin will /clearspambricks." @ NL @ "\c4Messing with other players will end in a kick or ban choosing on a admins choice of punishment.");
}
« Last Edit: August 17, 2012, 07:12:40 PM by wound »

try replacing all of the " @ NL @ " with just plain \n

alright, it works but now this comes up when i do /rules.


best method?

%client.chatmessage("line 1");
%client.chatmessage("line 2");
%client.chatmessage("line 3");

best method?

%client.chatmessage("line 1");
%client.chatmessage("line 2");
%client.chatmessage("line 3");
lol yep, anyway thanks lugnut and Ipquarx for the help, locking.