ID:1331316
 
(See the best response by FIREking.)
Code:
client/verb
announce(msg as text)
set name = "Announce"
set desc = "Send an announcement to the game."
world<<output ("<font color=red><b>Announcement from [src.key]:</b> [msg]</font>", "ooc-chatroom")
world<<output ("<font color=red><b>Announcement from [src.key]:</b> [msg]</font>", "an/ooc")
..()


Problem description: I was wondering if there was a more compiled and organized way of using multiple outputs for a single message instead of using the same line but with a different output. As you can see above, I have two separate outputs; but I was wondering if I could get them to work on the same string instead of wasting a few bytes on an entirely new string.

world << output("stuff\nstuff")


More specifically the \n macro stands for "insert new line here".
If I do multiple ones, would I have to add the \n every time for each respective output?

Also, would I do it like this?

world<<output ("<font color=red><b>Announcement from [src.key]:</b> [msg]</font>", "ooc-chatroom"\n"an/ooc")
Best response
I'm sorry for misunderstanding your problem. The \n macro is simply a line-break. It has nothing to do with outputting the same string to two different outputs.

One better way to perform your task would be this:

client/var/tmp/announce_string = ""
client/verb
announce(msg as text)
set name = "Announce"
set desc = "Send an announcement to the game."
announce_string = "<font color=red><b>Announcement from [src.key]:</b> [msg]</font>"
world<<output (announce_string, "ooc-chatroom")
world<<output (announce_string, "an/ooc")
..()
Alright, sorry if there was any confusion. Thank you for the help.
Please vote for my answer if it solved your problem, thanks!