View Single Post
05/30/14, 05:26 PM   #16
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
It depends on what you want printed to chat.

This is the d() function:
Lua Code:
  1. function d(...)    
  2.     for i = 1, select("#", ...) do
  3.         local value = select(i, ...)
  4.         if(type(value) == "table")
  5.         then
  6.             EmitTable(value)
  7.         else
  8.             EmitMessage(tostring (value))
  9.         end
  10.     end
  11. end

If all you want to print is simple text, then just use CHAT_SYSTEM:AddMessage("text").

Granted, you shouldn't be looking for 1 nanosecond optimizations. Good coding practices aside, only worry about optimizing when doing heavy calculations or frequent updates.
  Reply With Quote