我无法在love2D中运行lua游戏
当我尝试运行游戏时,收到此错误:
Error
[love "boot.lua"]:323: Cannot load game at path 'C:/Users/LENOVO/Desktop/LUA-Projects-
master/projects/3.Battle_arena.lua'.
Make sure a folder exists at the specified path.
Traceback
[love "callbacks.lua"]:228: in function 'handler'
[C]: in function 'error'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
注意:我通过将 lua 文件拖放到 love2D 应用程序窗口来运行该文件。
When I try to run the game, I receive this error:
Error
[love "boot.lua"]:323: Cannot load game at path 'C:/Users/LENOVO/Desktop/LUA-Projects-
master/projects/3.Battle_arena.lua'.
Make sure a folder exists at the specified path.
Traceback
[love "callbacks.lua"]:228: in function 'handler'
[C]: in function 'error'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
Note: I'm running the lua file by dropping it on the love2D application window.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您必须将包含
main.lua
的目录拖到 love 可执行文件上。对于您的情况,假设您的文件是入口点,请将3.Battle_arena.lua
重命名为main.lua
。来自入门
You have to drag the directory containing a
main.lua
onto the love executable. In your case, rename3.Battle_arena.lua
tomain.lua
, assuming your file is the entry point.From Getting Started
你的游戏文件夹中有
main.lua
吗? love2d 需要游戏文件夹中有main.lua
才能运行游戏,将3.Battle_arena.lua
重命名为main.lua
。如果您有任何其他问题,请尝试访问 love2d.org
do you have a
main.lua
in the game folder? love2d requires the game folder to havemain.lua
in order to run the game, rename3.Battle_arena.lua
tomain.lua
.if you have any other problems try visiting love2d.org