ZBrushCentral

New line on message string

In my notes I’ve got

[VarDef, NewLine, [StrMerge, [StrFromAsc, 13], [StrFromAsc, 10]]] // |N 

down as newline character(s).

However, this doesn’t seem to work for internal messages.

[VarSet,message, [StrMerge, "Hello", "NewLine", "world!"]]

I would hope to get:
Hello
world!

Only it doesn’t, it just ignores it with:
Helloworld!

I’ve tried \n \r\n and \n\r and am now all out of newline /carriage return codes.
Any ideas?

This works fine for me:

[VarDef,newLine, "\n"]

[IButton,"Show Note","Show the note",
   [Note,[StrMerge,"First line...",#newLine,"Second line..."]]
]

-Marcus

I’m getting this still:

zb

Can you post your code?

No need.

I briefly (and erroneously) thought #newLine was a keyword and not a variable that needs defining.

[VarDef, newLine, "\n"]

I was thrown by the octothorpe, officer. :woozy_face:

All together, this’ll work:

[VarDef, newLine, "\n"]
[VarDef, cr, "\n"]
[IButton, "Show Note", "Show the note",
   // [Note,[StrMerge,"First line...", #newLine, "Second line..."]] // works fine
   [Note,[StrMerge,"It wasn't a rock...", #cr, "It was a rock lobster!"]]
]/*End of ZScript*/
1 Like