用于 Windows 的 Lua

发布于 2024-08-02 12:17:48 字数 130 浏览 9 评论 0原文

我正在尝试使用“lua for windows” - SciTE 简单的例子,例如 Print("hello") 我按 Alt + R (根据教程说明),每次这样做我都会得到: “无法调试程序!” 有人遇到过这个问题吗?

I'm trying to use "lua for windows" - SciTE
Simply example such as Print("hello")
I hit Alt + R (per tutorial instructions), everytime I do this I get:
"Unable to debug program!"
Anyone had this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

胡大本事 2024-08-09 12:17:48

它适用于 XP 32 位系统。

我启动了 SciTE,打开了一个新文档,在第 1 行中输入 print "hello, world."。然后 Alt-R 提示我在继续之前保存文件。将其保存为 foo.lua 后,调试器启动,第 1 行是当前行。按预期单击调试控制台上打印的“Step”按钮(或 Alt+C),调试器退出,因为没有更多程序。

我在 Lua for Windows v5.1.4.23 中执行此操作,该版本不再是最新版本。

我假设您已经检查了所有常见的“是否已插入”问题...您正常安装了它,您已经注销并再次登录或在安装后的某个时间重新启动,lua -v 请尝试手动运行该文件,

C:\...>lua -v
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio

C:\...>>

将其保存到 hello.lua 并在命令提示符下输入 lua hello.lua

It works for me on XP 32-bit.

I launched SciTE, opened a new document, typed print "hello, world." into line 1. Alt-R then prompted me to save the file before continuing. After saving it as foo.lua, the debugger started and line 1 was the current line. Clicking the Step button (or Alt+C) printed on the debug console as expected, and the debugger exited because there was no more program.

I did this in Lua for Windows v5.1.4.23, which is no longer the most current version.

I assume you've already checked all of the usual "is it plugged in" questions... you installed it normally, you have logged off and on again or rebooted sometime since the install, lua -v says something sensible, etc.

C:\...>lua -v
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio

C:\...>>

Do try running the file manually by saving it to hello.lua and saying lua hello.lua to a command prompt.

纵山崖 2024-08-09 12:17:48

解决方案是手动将扩展名添加到文件中,因为保存文件时无法选择任何类型的扩展名(某种错误),这解决了我的问题。

foo.lua

the solution is to add the extension to the file manually because you cannot choose any type of extensions while you saving the file (kind of bug), this solved my problem.

foo.lua

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文