Difference between revisions of "Lua Language"

From Cheat Engine
Jump to navigation Jump to search
(Created page with "===Introduction=== Lua is a lightweight, scripting programming language based on an interpreter generating compiled bytecodes. It was designed in Brasil by Roberto Ierusalim...")
 
m (Comments are --)
Line 14: Line 14:
 
==Comments==
 
==Comments==
  
In Lua simple comments begin with <code><nowiki>==</nowiki></code> and end at the end of line.
+
In Lua simple comments begin with <code><nowiki>--</nowiki></code> and end at the end of line.
Multi-line comments begin with <code><nowiki>==[[</nowiki></code> and end with <code><nowiki>]]</nowiki></code> .
+
Multi-line comments begin with <code><nowiki>--[[</nowiki></code> and end with <code><nowiki>]]</nowiki></code> .
  
 
<pre>
 
<pre>
== This is a simple comment just to the end of this line
+
-- This is a simple comment just to the end of this line
This is not a comment but a future syntax error == This is a new simple comment
+
This is not a comment but a future syntax error -- This is a new simple comment
==[[ First line of a multi-line comment
+
--[[ First line of a multi-line comment
 
Second line of a multi-line comment
 
Second line of a multi-line comment
 
Last line of a multi-line comment]]
 
Last line of a multi-line comment]]

Revision as of 08:24, 25 April 2022

Introduction

Lua is a lightweight, scripting programming language based on an interpreter generating compiled bytecodes.

It was designed in Brasil by Roberto Ierusalimschy, Waldemar Celes and Luiz Henrique de Figueiredo in 1993.

CE Lua is a specific version of Lua interpreter adapted by Dark Byte for Cheat Engine.

Syntax

CE Lua interpreter respects traditional LUA syntax and provides some extra features. The Lua Script Editor provide a real-time colored syntax and a Syntax Check feature (Ctrl+Alt+C).

Comments

In Lua simple comments begin with -- and end at the end of line. Multi-line comments begin with --[[ and end with ]] .

-- This is a simple comment just to the end of this line
This is not a comment but a future syntax error -- This is a new simple comment
--[[ First line of a multi-line comment
Second line of a multi-line comment
Last line of a multi-line comment]]

Variables

Flow control

Functions

Tables

External links