Lua Fundamentals
In this chapter, we will learn the basics of the Lua programming language. You do not need to be a Lua expert or even write any Lua code if you only work on the C++ side. However, understanding the basics will make you more efficient when integrating Lua into C++.
If you already know Lua programming, you can skip this chapter. If you have not used Lua for a while, you can use this chapter to recap. If you want to learn more about Lua programming, you can get the official Lua book: Programming in Lua. If you do not know Lua programming, this chapter is for you. Coming from C++, you can read any Lua code with the brief explanations on Lua code in this book. You can believe in yourself and research online when you need to.
We will talk about the following language features:
- Variables and types
- Control structures