# HG changeset patch # User MMOSimca # Date 1412421044 14400 # Node ID 37c27a7509c4457608fbc4e6f844056b93c3469c # Parent 146072e3915082c5d73e5f601d383a6f96f2be39 Expanded the Debug function to no longer -require- arguments other than the message. diff -r 146072e39150 -r 37c27a7509c4 Main.lua --- a/Main.lua Sat Oct 04 07:09:24 2014 -0400 +++ b/Main.lua Sat Oct 04 07:10:44 2014 -0400 @@ -188,17 +188,22 @@ -- HELPERS ------------------------------------------------------------ local function Debug(message, ...) - if not DEBUGGING or not message or not ... then + if not DEBUGGING or not message then return end - local args = { ... } - - for index = 1, #args do - if args[index] == nil then - args[index] = "nil" + + if ... then + local args = { ... } + + for index = 1, #args do + if args[index] == nil then + args[index] = "nil" + end end + _G.print(message:format(unpack(args))) + else + _G.print(message) end - _G.print(message:format(unpack(args))) end