Lua Scripting: Fix table

This commit is contained in:
rubenwardy 2018-09-27 15:27:07 +01:00
parent 04753b8ff6
commit 5b22b677e7
No known key found for this signature in database
GPG Key ID: A1E29D52FF81513C

View File

@ -113,14 +113,13 @@ A variable will be only one of the following types and can change type after an
assignment. assignment.
It's good practice to make sure a variable is only ever nil or a single non-nil type. It's good practice to make sure a variable is only ever nil or a single non-nil type.
| Type | Description | Example | | Type | Description | Example |
|----------|----------------------------------------------------|-------------------------------------------| |----------|---------------------------------|----------------|
| Nil | Not initialised. The variable is empty, it has no value | `local A`, `D = nil` | | Nil | Not initialised. The variable is empty, it has no value | `local A`, `D = nil` |
| Number | A whole or decimal number. | `local A = 4` |
| Number | A whole or decimal number. | `local A = 4` | | String | A piece of text | `local D = "one two three"` |
| String | A piece of text | `local D = "one two three" | | Boolean | True or False | `local is_true = false`, `local E = (1 == 1)` |
| Boolean | True or False | `local is_true = false`, `local E = (1 == 1)` | | Table | Lists | Explained below |
| Table | Lists | Explained below |
| Function | Can run. May require inputs and may return a value | `local result = func(1, 2, 3)` | | Function | Can run. May require inputs and may return a value | `local result = func(1, 2, 3)` |
### Arithmetic Operators ### Arithmetic Operators