Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Sample code in Sublime / Corona Editor getting attempt to index a nil value
Started by scott.roth.gamer Jun 11 2016 05:11 AM

2 replies to this topic
sublime corona editor nil value global display

Best Answer Rob Miracle , 11 June 2016 - 05:23 PM

Corona SDK uses it's own version of Lua compiled into the product. You cannot use the external standalone version of Lua. Lua doesn't know about Corona SDK APIs.

 

Rob

[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

scott.roth.gamer

[GLOBAL: userInfoPane.html]
scott.roth.gamer
  • Observer

  • 10 posts
  • Corona SDK

I have installed Corona SDK and can run sample apps from there just fine.  Now, I installed Sublime and the Corona Editor on top of that.  I also downloaded Lua, compiled it, and adjusted Sublime path to point to that version of Lua.  I set Sublime to treat all files with lua extension as Corona SDK Lua files.  When I open the main.lua from any of the sample apps and build it I am getting an "attempt to access nil value (global 'display')".  This is occurring on the first executable line of each sample program.  See attached screen shot.

 

  

Attached Files



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,789 posts
  • Enterprise

  Best Answer

Corona SDK uses it's own version of Lua compiled into the product. You cannot use the external standalone version of Lua. Lua doesn't know about Corona SDK APIs.

 

Rob



[TOPIC: post.html]
#3

scott.roth.gamer

[GLOBAL: userInfoPane.html]
scott.roth.gamer
  • Observer

  • 10 posts
  • Corona SDK

Thanks Rob!  A short while after posting this I stumbled on the ability to run the project from the Corona Editor menu :-)

 

 




[topic_controls]
[/topic_controls]