Lua Programming Tutorial

The Zeus Lite installer comes with an installation of Lua, making it easy to get started at learning to program Lua. This page walks through the steps needed to write your first Lua code using Zeus Lite.


Step 1: Create Some Lua Code

To create some example Lua code use the Templates feature as shown in the image below:

Lua Template

As per that image, select the Templates panel, select the Lua Document Type from the dropdown list, select the New File option and save the resulting code to the example.lua file.


Step 2: Run the Example Lua Code

With the example.lua as the active file, use the Macros, Execute 'example.lua Script menu as shown below:

Lua Execute


This menu opens up the Lua execution window and runs the currently active file using the Lua interpreter. The result will be the following execution window:

Lua Execution

As per the instructions found in the Lua code and reflected in the execution window, fill in a user name and hit enter to complete the execution of the example.lua file.

The execution of the script will now be complete, and Zeus Lite will capture the output produced and display that output inside the editor as shown below:

Lua Execution


Step 3: Checking for Errors

It is also possible to do a basic syntax check of the Lua file from inside the editor. With the example.lua as the active file, use the Compiler, Compile menu to run the syntax check.

As an example, assume the end statement is missing from the function. After running the check on the broken file, the following output will be produced:

Lua Execute

Click on the line of error output and Zeus Lite will navigate to the file and line number that is at fault.


Step 4: Learn About the Lua Programming Language

To get more information about the Lua programming language and to start learning the language, make sure the example.lua is the active file, and then use the Macros, Lua Reference Manual menu. This will open up the Lua documentation inside the browser window. Zeus Lite is running the latest 5.4 version.

Lua Execute



Latest Version: Zeus Lite
Released: 2nd July 2025