I made a debug function that only outputs if the program is running in debug mode, but for some reason it simply won't work.
function debug{...}
if bDebug then --bDebug is whether the program is in debug mode. It's set to true.
for i,v in ipairs(arg) do
print("[DEBUG] "..v)
end
end
end
Here's the program's output:
fireflyGLASS v0.1 alpha
Initializing classes...
1/5 Initialized 'box'
...
5/5 Initialized 'playerSurface'
I have a line of code that says debug("Running in debug mode.")
but nowhere in there does it say that.
Can someone please tell me what's going on?