HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How do I put a carriage return in JASS typed strings?

02-21-2007, 07:21 AM#1
CaptainPicard
The following JASS code produces output with a |n displayed on the screen rather than a carriage return (end-of-line) like I want. How can I get the carriage return?

Collapse JASS:
            call QuestMessageBJ( bj_FORCE_PLAYER[4], bj_QUESTMESSAGE_COMPLETED, "Mission Accomplished: |cffff9900The Barracks Headmasters|r|n Telemar Ne'Fiin and Jal'Vin Elas have been incapacitated.  Aszune will now administer the water of eternity." )
02-21-2007, 07:40 AM#2
Krysho
Probably \n or perhaps \r\n

I know I've seen it work for game messages used in JASS, not sure about quest messages, but the idea seems the same.
02-21-2007, 12:24 PM#3
The)TideHunter(
Just do it on another line, Wc3 parser still allows it, example:

Collapse JASS:
function MyFunc takes nothing returns nothing
    call QuestMessageBJ( bj_FORCE_PLAYER[4], bj_QUESTMESSAGE_COMPLETED, "Mission Accomplished: |cffff9900The Barracks Headmasters|r
Telemar Ne'Fiin and Jal'Vin Elas have been incapacitated.  Aszune will now administer the water of eternity." )
endfunction
02-21-2007, 02:56 PM#4
WNxCryptic
Can't you also use |n ?
02-21-2007, 03:40 PM#5
chobibo
hey guys just wanted to ask the difference between the carriage return and the |n, sorry if its inappropriate to ask.
02-21-2007, 03:58 PM#6
Vexorian
|n doesn't work all the time when using strings in JASS and is the only way of doing it in tooltips (unless you edit the tooltip with a text editor)