what does local mean?

what does local mean (im watching the tutorial 'make a game in 8 minutes)? would it make a difference if i did
ball = display.newImage( “blue ball.png” )
instead of
local ball = display.newImage( “blue ball.png” ) [import]uid: 25272 topic_id: 5381 reply_id: 305381[/import]

anyone? wow the forums are so empty here… [import]uid: 25272 topic_id: 5381 reply_id: 17968[/import]

SOMEONE HELP ME [import]uid: 25272 topic_id: 5381 reply_id: 17973[/import]

Anything that isn’t declared “local” is global. 99% of the time, you’re going to want locals, both because they help avoid the clutter of having a million variables that could collide with one another, but also because they are generally faster to access than globals.

There’s a lot more information on locals in Programming in Lua.

Good luck!
Mike@PlanetLua

[import]uid: 9659 topic_id: 5381 reply_id: 18015[/import]

dude learn some patience, this is a forum not a hotline. There was just 20 minutes before you started complaining, and then just 20 more minutes later you start shouting. [import]uid: 12108 topic_id: 5381 reply_id: 18026[/import]

its been 8 hours on this thread and still no one has answered the question. Compared to GameSalad where i would have gotten my answer in minutes. [import]uid: 25272 topic_id: 5381 reply_id: 18030[/import]

What do you mean no one answered the question? I gave you a link to the source, written by the man who invented Lua. You’re not going to get much better than that. All you have to do is read that link and it should explain everything.
[import]uid: 9659 topic_id: 5381 reply_id: 18044[/import]

google local variable in LUA and you will get your answer.
no need to get all crazy.

but honestly you need to read a book or two on programming.

local versus global variables is a matter of what is called “scope”.

globals can be “seen” by everyone(functions and chunks alike).

locals can only be “seen” by the function it is declared in and never from within another functions, unless you pass the variable as an parameter(however this is a general programming concept)

LUA may have different terminology to reflect these concepts.
[import]uid: 11094 topic_id: 5381 reply_id: 18053[/import]

Im X Gamesalad user, Well i am not agree with you, Corona forums are the best trust me, i been with corona 2 weeks for now, and dont even wont to think of gamesalad anymore.

Corona is the way to go. [import]uid: 11559 topic_id: 5381 reply_id: 18197[/import]

@lococo - thanks for that link! I’ve been hoping to stumble across a manual about Lua. [import]uid: 25480 topic_id: 5381 reply_id: 18319[/import]