Lua Basics
Basic Syntax and Data Types
LUA is a lightweight and easy to learn programming language. In this section, we will cover the basic structure of a LUA script, as well as the different data types available and how to manipulate them.
Script Structure
A LUA script is a plain text file with the .lua
file extension. The script is executed from top to bottom, and it can contain a combination of statements, comments, and functions.
Statements
Statements are commands that perform a specific action, such as assigning a value to a variable or calling a function.
-- This is a statement that assigns the value "hello" to the variable "greeting"
greeting = "hello"