因此,我剛剛安裝了Lua,Love2D,LuaJIT和Sublime Text與Lua/Love包。當我再嘗試運行這個小程序:嘗試運行Love2D應用程序時出錯
function love.draw()
love.graphics.print("Hello World", 400, 300)
end
隨着CTRL+SHIFT+B
,然後LuaLove - Run
我得到這個錯誤:
luajit: [path to program]\main.lua:1: attempt to index global 'love' (a nil value)
stack traceback:
[path to program]\main.lua:1: in main chunk
[C]: at 0x00402020
[Finished in 0.0s with exit code 1]
[cmd: ['luajit', '[path to program]\\main.lua']]
[dir: [path to program]]
[path: [every thing in path variable]]
我認爲這是與我沒有把愛的正確的路徑變量。但它是這樣的:C:\Program Files\LOVE
我希望有人有一個解決方案。