Don't know a thing about Lua and need to know how to start? Or are you ready learn how to print the contents of a file and make variables persistent? These Tutorials will help you fix it.
The Basics of Lua
Starting to program in Lua? Visit these tutorials to learn how to program.
- Hello Lua (Learn the basics of Lua.)
- Variables and Printing (The six types of variables and how to print a variable to the screen.)
- Making your First Function (How to make your own custom function.)
- Loops and Statements (Learn how to make for and while loops and also use the statements to make certain things happen only if a condition turns out true.)
- The Difference between Local and Global (Learn the cause of that variable turning into nil when the script errors at that line.)
- Putting Stuff on Tables (Learn more about Tables and multidimensional Tables.)
- Tips and Tricks (Some other tips and tricks used when making scripts.)
Running Scripts From Other Scripts
Your script is getting large and the editor is getting more laggy because of the large script. To combat this you will need to split up the script into multiple parts.
- How to Use Modules (Learn how to use the require function.)
- dofile (Information on the dofile function.)
- The Load Function (The load function can be used to load a function from a string.)
Introduction of Concepts
Here is a list of tutorials that introduce you to things such as reading from and writing to files, modular scripts, coroutines, object oriented programming, and more.
Introduction to Disk IO
- How to Remember a Name (Introduction to disk IO. Learn the basics of the io library.)
- How to Print the Contents of a File
- How to Save the Contents of Tables
Object Oriented Programming
- How to Create a Class (Learn how to create classes using the setmetatable function.)
- How to Make a Vector3 more like a number (There are more metatable functions than __index. Learn how to use the extra functions to make a Vector3 class that can be used like a number can.)
Dealing with Coroutines
- Using Coroutines (Learn about Coroutines.)
- Building a Custom Ilterator (Make a custom ilterator function that goes through elements of multiple tables.)
- Making Async Functions (Build a module that allows you to make asynchronous functions.)