Some LUA syntax help
Posted: Sun Aug 05, 2007 12:47 am
I just wanted to clear up some basic syntax questions I have as I read over the plethora of material both in the assets and on this site:
1) Normally I would have thought that if you say "TestVariable = 3", that would set the value of that variable to 3....but I have used a code from Archer01 (that works) which does the following: "local supportTeam = 3", which means that 3 is indeed a variable in this case; and if that is the case, how then, can one store a new variable with a value of 3?
2) What is the purpose of using "local" before defining a variable?
I probably had more questions, but I'm too tired to remember them at the moment.
1) Normally I would have thought that if you say "TestVariable = 3", that would set the value of that variable to 3....but I have used a code from Archer01 (that works) which does the following: "local supportTeam = 3", which means that 3 is indeed a variable in this case; and if that is the case, how then, can one store a new variable with a value of 3?
2) What is the purpose of using "local" before defining a variable?
I probably had more questions, but I'm too tired to remember them at the moment.