almightyhood - is correct.. I fell into this same trap saving with notepad.
The other important thing is to use an editor that has a Lua syntax color display.
It makes the script much easier to read and then understand...
I use LuaDevelomentTools.exe part of the Eclipse Lua download...
but there are many others.. they are free downloads...
Find one your happy with and you will quickly pick it up..
Also when you post a question it helps if you show the script you are having a problem with.
Use the (code) button to show your code sample..then choose the (code lang=lua) button
Paste or write your code after the (code lang=lua) line, that will be automatically added to your post
Also use plenty of -- Rems to help explain your code, as your code gets bigger you will be glad to have rems.
the 2 -- are the rem command
IMPORTANT - don't forget to close your code block by adding this
(/code) but use square brackets instead of curly brackets.. I had to use curly because if I uses the square
ones then my script block would not show.. ( gee I'm making this worse.. hope it make sense )
see my example..
-- code sample for my test file named [ myfile_name.lua ]
--
-- you must have 2 functions that are the file name plus _init(e) and _main(e)
-- myfile_name_init(e)
-- myfile_name_main(e)
--
-- function myfile_name_init(e)
-- this initialize function is called automatically by Lee's
-- setup code for each script used. ( I think )
-- you will forget to change this name to the name of your file - (I forget all the time)
-- so always make this your first check when you have problems
function myfile_name_init(e)
-- this is run once and only once at start up.
-- you can set some start values for variable here
end
-- end of function _init
-- you will also forget to change this name to the name of your file
-- so always make this your first check when you have problems
function myfile_name_main(e)
-- your main code here
end
-- end of function _main