First, please read "EDIT2" in my post above. I fixed the problem. Sorry about that. This post refers to the edited code.
placeLight is a parameter variable, which is a way of saying that `placeLight` is a named container that holds the first value passed to the `light()` function when it is called. You can pass values to functions by putting that value (or list of values) between the parentheses when you call that function. So, when I call `layer(i %9 == 0)`, placeLight receives the value of `i % 9 == 0`. In this case, placeLight will either be `true` or `false`. If it's `true`, the `if` statement will execute `light()`. Otherwise, it just skips over the entire `if` block.
For example, `print` is a function. If you call it like this:
print("Greetings, user!") it will output "Greetings, user!" to the screen. `print()` receives a variable number of arguments and prints each of them to standard output. These:
print("My ", "keyboard ", "is ", "tinier ", "than ", "yours.")print(true, 5, "string", nil, {}, function() end, coroutine.create(function() end))are both valid calls to `print`.
If you want to see how it works in your program, add this line to your `light()` function:
print(placeLight)
That will take the value of the `placeLight` variable and pass it to the `print()` function. It should print 8 `false`'s followed by one `true`, until it stops.