Shoutbox

Line Breaks In scripts - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Line Breaks In scripts (/showthread.php?tid=85390)

Line Breaks In scripts by Recsant on 08-14-2008 at 08:29 PM

As a Newbie I'm sure this is a meaningless question but i need to know how to do line breaks inside a function.

E.g 

code:
function OnEvent_ChatWndSendMessage(pChatWnd, sMessage){
sMessage = sMessage.replace("text to replace"," Some text A line break here some more text");

RE: Line Breaks In scripts by haydos on 08-14-2008 at 08:32 PM

Use \n

code:
function OnEvent_ChatWndSendMessage(pChatWnd, sMessage){
sMessage = sMessage.replace("text to replace"," Some text \n some more text");

RE: Line Breaks In scripts by Recsant on 08-14-2008 at 08:38 PM

still not working
its changing the text but it just comes out as Some text here /n some more text here


RE: Line Breaks In scripts by Quantum on 08-14-2008 at 08:41 PM

It's \n :)


RE: Line Breaks In scripts by Recsant on 08-14-2008 at 08:48 PM

:HeadBanging: I cant belive i was that stupid thanks it works now youve guys been a  great help hope to see you around


RE: Line Breaks In scripts by Quantum on 08-14-2008 at 08:52 PM

For the record it was haydos that helped he must have got the wrong code and the edited it and you didn't see it. Then i pointed it out :)

Good Luck!


RE: Line Breaks In scripts by haydos on 08-14-2008 at 09:09 PM

quote:
Originally posted by john-t
For the record it was haydos that helped he must have got the wrong code and the edited it and you didn't see it. Then i pointed it out :)

Good Luck!
Or I just forgot to close my code tags.... but ok ¬¬
RE: Line Breaks In scripts by effection on 08-15-2008 at 10:30 AM

in windows it should be "\r\n"