✓ Accepted answer
You can't include random pieces of English inside your program.
The Lua interpreter will believe it's code and cause problems.
If you need to include explanatory text, you have to use comments (using a double hyphen)
function SayHello(Name)
print(Name..'!')
end
SayHello("Hello Narblet")
SayHello("Hello FUDGEWAD")
(In this editor, comments (the stuff that Lua ignores) is highlighted green. Compare with what you originally posted)
From comments:
Comments don't do anything. The computer ignores them. So why would you ever have comments in code?
While they don't mean anything to Lua, they do (should) mean things to humans writing and reading code. You write comments to make explanations to yourself or to others using your code (like you had).
Good code includes comments.
On the other hand, since comments make Lua ignore pieces of the program, it's frequent that you'll see things like this:
x = x ^ 0.5
Where some code has been "commented out" to be ignored. While this can be convenient for debugging, in the long term it's almost universally considered to be bad practice to have this commented-out code remain.
5 comments
What do you mean the LUA would cause problems
The computer will treat everything except comments (the green things) as code, thus your error. Also Lua is not an acronym.
I mean the text would cause problems for Lua. If you were ordering food at a restaurant, and I said, "I would aghi like a oshaowiehei burger with oawihe no gof pickles asodifjasodjfi", you wouldn't get anywhere. You're including garbage that doesn't mean anything -- which confuses the waitress (or Lua, in this context)
So the green letters means nothing then. I shouldn't have included them?
Good code includes comments -- they can and should mean something to HUMANS -- (yourself or others using your code) -- but ultimately the computer will ignore them. Explanations are good to keep track of what's going on.