comparison Main.lua @ 350:37c27a7509c4 WoD

Expanded the Debug function to no longer -require- arguments other than the message.
author MMOSimca <MMOSimca@gmail.com>
date Sat, 04 Oct 2014 07:10:44 -0400
parents 146072e39150
children e7cbe43d8418
comparison
equal deleted inserted replaced
349:146072e39150 350:37c27a7509c4
186 186
187 187
188 -- HELPERS ------------------------------------------------------------ 188 -- HELPERS ------------------------------------------------------------
189 189
190 local function Debug(message, ...) 190 local function Debug(message, ...)
191 if not DEBUGGING or not message or not ... then 191 if not DEBUGGING or not message then
192 return 192 return
193 end 193 end
194 local args = { ... } 194
195 195 if ... then
196 for index = 1, #args do 196 local args = { ... }
197 if args[index] == nil then 197
198 args[index] = "nil" 198 for index = 1, #args do
199 end 199 if args[index] == nil then
200 end 200 args[index] = "nil"
201 _G.print(message:format(unpack(args))) 201 end
202 end
203 _G.print(message:format(unpack(args)))
204 else
205 _G.print(message)
206 end
202 end 207 end
203 208
204 209
205 local TradeSkillExecutePer 210 local TradeSkillExecutePer
206 do 211 do