我做了一个调试功能,仅在程序在调试模式下运行时才输出,但由于某种原因,它根本不起作用。
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
这是程序的输出:
fireflyGLASS v0.1 alpha
Initializing classes...
1/5 Initialized 'box'
...
5/5 Initialized 'playerSurface'
我有一行代码说,debug("Running in debug mode.")
但那里没有任何地方说。
有人可以告诉我发生了什么吗?