Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Advertisement

Outputs text to a local MessageFrame, with optional color id.- Updated in 2.4.2

MessageFrame:AddMessage(text [, r, g, b, id, addToStart])

Arguments[]

text
string - Message to output
r
number?Optional. Could be nil. - Red font color component between 0.1 and 1.0.
g
number?Optional. Could be nil. - Green font color component between 0.1 and 1.0.
b
number?Optional. Could be nil. - Blue font color component between 0.1 and 1.0.
id
number?Optional. Could be nil. - Identifies the line of text for later accessing it.
addToStart
boolean - True to add the message to the start of the MessageFrame as if it were the first printed message.

Details[]

  • DEFAULT_CHAT_FRAME refers to the current default chat window.
  • UI Escape Sequences are often applied to style the text or insert hyperlinks.

Examples[]

Outputs "Testing" on in red to the default chat window:

DEFAULT_CHAT_FRAME:AddMessage("Testing", 1.0, 0.0, 0.0);

Outputs "AddOn Loaded!" in green at the start of the default chat window:

DEFAULT_CHAT_FRAME:AddMessage("AddOn Loaded!", 0.0, 1.0, 0.0, nil, true);

Styles the text using UI Escape Sequences:

DEFAULT_CHAT_FRAME:AddMessage("Look at this: messages can be |cffff0000red|r and |cff00ff00green|r!");

Patch changes[]

Advertisement