llde / xOBSE

Oblivion Script extender source
248 stars 35 forks source link

New line symbol for StringVar2 and sv_replace #121

Closed DelmorS closed 3 years ago

DelmorS commented 3 years ago

Good day to you

Is it possible somehow to write "new line symbol" inside StringVar2?

I found very old mod for Oblivion (Player's Diary by skingrad24 with scripts by Visman) and when I look through the Quest and Object scripts of the mod, I can see, that author performs String replace there with sv_replace command. And, he does replace of "new line symbol" with "br" (it is done in order to add text from MessageBox as new record to Book).

And I can not understand, how it was compiled at all, because Construction Set Script Editor (even with Extender) does not allow save and compile script, which has parenthesis on different lines! Please, check the screen:

Screenshot_2

Can you please help and tell me, is it possible to compile it at all, or may be I can insert some special "new line symbol" instead of simple Enters?

Thank you

katawful commented 3 years ago

Use %r inside any string for a carriage return. If you're looking to affect HTML for books you would use literal <br> in the replacement string

DelmorS commented 3 years ago

Use %r inside any string for a carriage return. If you're looking to affect HTML for books you would use literal <br> in the replacement string

Wow, it worked, thank you very much!