Wikia

WoWWiki

Watchlist Recent changes

PrintMSG

This is a user-defined function that you can copy and paste into your addon. Replace <PREFIX> with your AddOn's prefix to avoid conflicts between different versions of these functions.

Displays a custom message to the default chat frame, for the user to see. A prefix and suffix can also be added, with ease, in the function. This is just to save you from typing out, DEFAULT_CHAT_FRAME:AddMessage("Prefix " .. "Hello world!" .. " Suffix", 1, 1, 1); everytime you want to tell the user something.

<PREFIX>_printMSG("Hello world!");


Function Parameters Edit

Arguments Edit

msg 
String - This is the message you wish to display.

Returns Edit

nil

Example Edit

<PREFIX>_printMSG("Hello world!");

ResultEdit

Displays the words Prefix Hello world! Suffix, in the default chat frame.


CodeEdit

 function <PREFIX>_printMSG(msg)
    DEFAULT_CHAT_FRAME:AddMessage("Prefix " .. msg .. " Suffix", 1, 1, 1);
 end

Pages on WoWWiki

94,146pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
55,612photos on this wiki
See more >

Recent Wiki Activity

See more >

Recent Questions

Around Wikia's network

Random Wiki