When i find a sample lua code on the web , i'm trying on gideros. but i always take error. And i always take this error:
main.lua:29: attempt to index global 'display' (a nil value)
stack traceback:
main.lua:29: in function 'init'
main.lua:166: in main chunk
Why does this error ocur? Thnks in advance
Comments
I would suggest you go through and open and run each of the examples that come with Gideros Studio and take a look at how the code works, those samples can really help you get a good hold of how Gideros Studio and the API work.
The concept here is a bit different lua being weakly typed dynamic language, but it still will be easier for you to grasp, than if you'd start from 0.
I'd suggest you to start with examples. Set a goal what you want to accomplish and trying combining examples to do that.
If you are interested in Box2d physics, you can try out tutorials from this thread:
http://www.giderosmobile.com/forum/discussion/1387/box2d-tutorial#Item_2
or here is a list of different examples and tutorials for gideros:
http://giderostutorials.com/