Wikia

WoWWiki

API print

Talk0
98,549pages on
this wiki
Icon-information-22x22This function is implemented by FrameXML in RestrictedEnvironment.lua.

Passes its arguments to the current print output handler. By default, this will output them all to the default chat frame.

print(...)

Contents

Arguments Edit

... 
Any - any number of any type of values.

Example Edit

print("Hello, WoW!")

prints Hello, WoW!

print("Hello", "this is a", nil, "value")

(note that "nil" is not in double quotes)

prints Hello this is a nil value

print("Hello", "this is a"..nil, "value")

Throws the error, "attempt to concatenate a nil value"

print("Hello", "this is a", {}, "value")

prints Hello this is a table: ###### value

Details Edit

  • This function is a securecall/forceinsecure wrapper around the current print output handler function. Instead of attempting to replace it, you can set your own output handler function using setprinthandler(func).
  • This function serves as a cleaner replacement from DEFAULT_CHAT_FRAME:AddMessage(); unlike which, it can safely be used to output nil values.

History Edit

  • Added in 3.0.2 (8926)
Advertisement | Your ad here

Photos

Add a Photo
62,187photos on this wiki
See all photos >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki