windows 使用 IntelliJ IDE 和 Lua 编程语言制作 Corona 应用程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6184800/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Using IntelliJ IDE and Lua Programming Language to make Corona Applications
提问by Muhammad Shahab
I have successfully installed:
我已经成功安装:
1) IntelliJ IDEA 10.0.3 with Lua Plugin 2) Corona SDK 3) Corona API for IntelliJ
1) IntelliJ IDEA 10.0.3 with Lua Plugin 2) Corona SDK 3) Corona API for IntelliJ
I can now use autocompletion features of Lua and Corona using IntelliJ IDEA
我现在可以使用 IntelliJ IDEA 使用 Lua 和 Corona 的自动完成功能
Now my problem is :
现在我的问题是:
When I try to run a sample main.lua script file using IntelliJ IDEA, i get this error
当我尝试使用 IntelliJ IDEA 运行示例 main.lua 脚本文件时,出现此错误
"C:\Program Files\Lua.1\lua.exe" C:/Users/mshahab/IdeaProjects/TestOne/main.lua
C:\Program Files\Lua.1\lua.exe: C:/Users/mshahab/IdeaProjects/TestOne/main.lua:1: attempt to index global 'display' (a nil value)
stack traceback:
C:/Users/mshahab/IdeaProjects/TestOne/main.lua:1: in main chunk
[C]: ?
Process finished with exit code 1
And when I run it (main.lua file) manually using the Corona Simulator it works fine. I am not sure what am I missing here ? Any pointers would be great :) Thanks
当我使用 Corona Simulator 手动运行它(main.lua 文件)时,它工作正常。我不确定我在这里错过了什么?任何指针都会很棒:)谢谢
I am attaching the screenshot too
我也附上截图
回答by sylvanaar
There is a good blog post that explains the setup
有一篇很好的博客文章解释了设置
http://producerism.com/blog/how-to-develop-in-corona-sdk-on-windows/
http://producerism.com/blog/how-to-develop-in-corona-sdk-on-windows/
回答by Mud
"C:\Program Files\Lua\5.1\lua.exe"C:/Users/mshahab/IdeaProjects/TestOne/main.lua
"C:\Program Files\Lua\5.1\lua.exe"C:/Users/mshahab/IdeaProjects/TestOne/main.lua
This is running the file under vanilla Lua. Lua has no display
library and your code isn't loading one.
这是在 vanilla Lua 下运行文件。Lua 没有display
库,您的代码也没有加载。
run it (main.lua file) manually using the Corona Simulator
使用Corona Simulator手动运行它(main.lua 文件)
You're running the script in a totally different app here, one that includes the display
library. You need to configure IntelliJ to run Lua scripts via the simulator.
您正在一个完全不同的应用程序中运行脚本,其中包含display
库。您需要配置 IntelliJ 以通过模拟器运行 Lua 脚本。