The Editor
But what should we use to program? We don't want to use a piece of paper to write our script on it. Certainly not.
Word? Excel? Wordpad?
Hmm. Wordpad could be used. However, it doesn't offer any advantages.
Fortunately, we can download several programms from the web, knowing LUA as programming language. And they are free of charge.
These programms are able to color our key words for a better overview for example. They do the same with text, numbers or comments.
Some of these programms are also able to point out errors. This makes development of a script very comfortable.
We do not want to write only. We would like to have the possibility to execute what has been developed. For this purpose we use an adequate editor. Please find different editors in the annex.
In the following chapters we will use an editor called LuaEdit. We could also use other editors as well but with LuaEdit, executing and testing is much easier compared to other editors. However, try other editor programms as well by yourself.
Later on I will use another editor. This one will be much faster as LuaEdit and offers some other advantages. But we will not be able to check our script with that editor.
Though, this is what we really need to learn about our failures.
Download LuaEdit at this link http://luaedit.luaforge.net/
Then install
After installation of our editor we will be able to write our source code. At the beginning the screen of the editor looks a little bit empty but this will change.

We don't need the editor really right now but to become familiar with it we are going to use LuaEdit now.
At first we want to change the editor settings. This can be done in different ways but we decide to do this as follows.
The editor settings can be found at the menu point "Tools"

A separate window opens and choose the tab "Display".

All remaining points we do not change at the moment.

Here we find changeable settings which are most interesting for us at the moment.
Show Gutter: to show a bar on the left side of the screen (we want to)
Gutter Width: the width of the bar (trial and error)
Show Line Numbers: self-explanatory (klar, sie sollen)
Leading Zeros: line numbers with leading zeros (matter of taste)
The remaining points we do not change right now.
With the tab "Colors" we can change the color for comments, key words and so on.
As we do not know all of them right now, we leave it as it is. We leave all other possibilities for changing the settings as they are.
Now we open a new file/unit. We do this with

A new empty document/file opens.

It still has the name Unit1.lua but we are going to change this afterwards.
And on the left side we see the bar with the line numbers.
This should be enough for that moment. More about the editor will come, if we need it.
Copying of any content of this site (text or graphics) is not allowed, excepted any source code shown in this tutorial. See also: ....Disclaimer
Copyright © Robert Schmitz 2006
Copyright © Robert Schmitz 2006