Reputation: 4270
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 works fine. I am not sure what am I missing here ? Any pointers would be great :) Thanks
I am attaching the screenshot too
Upvotes: 13
Views: 12218
Reputation: 8216
There is a good blog post that explains the setup
http://producerism.com/blog/how-to-develop-in-corona-sdk-on-windows/
Upvotes: 14
Reputation: 28991
"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.
Upvotes: 3