开发者

Using IntelliJ IDE and Lua Programming Language to make Corona Applications

I have successfully installed:

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

Now my problem is :

When I try to run a sample main.lua script file using IntelliJ IDEA, i get this error

"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: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 wo开发者_运维技巧rks fine. I am not sure what am I missing here ? Any pointers would be great :) Thanks

I am attaching the screenshot too

Using IntelliJ IDE and Lua Programming Language to make Corona Applications


There is a good blog post that explains the setup

http://producerism.com/blog/how-to-develop-in-corona-sdk-on-windows/


"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.

run it (main.lua file) manually using the Corona Simulator

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜