0

プログラムがデバッグモードで実行されている場合にのみ出力するデバッグ関数を作成しましたが、何らかの理由で機能しません。

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.")が、どこにもそうは書かれていません。

誰かが何が起こっているのか教えてもらえますか?

4

1 に答える 1

0

待って!私はそれを考え出した。

local bDebug初期化した後に初期化したことが判明し、debug()lua が狂ってしまいました。

于 2016-07-12T02:07:23.720 に答える