ExpiredReign
Deity
I'm trying to understand Lua, and programming in general, and I keep coming across log messages which I assume would be errors, but I am not 100% sure if they are.
eg.
or
or
Here I am assuming the code chunks are looking into a table and expecting to find a field or value of something and instead finds nothing and says as much.
Now is this a fault of the programmer, failing to create the table properly, or looking in the wrong table, or the table just not being populated at the time of the inspection, or just something that happens?
Is it possible to log messages that explicitly state the expected results?
eg.
Thanks
Still learning as I go.
eg.
Code:
attempt to index field '?' (a nil value)
Code:
attempt to index field 'SpecificallyNamedField' (a nil value)
Code:
attempt to index a nil value
Here I am assuming the code chunks are looking into a table and expecting to find a field or value of something and instead finds nothing and says as much.
Now is this a fault of the programmer, failing to create the table properly, or looking in the wrong table, or the table just not being populated at the time of the inspection, or just something that happens?
Is it possible to log messages that explicitly state the expected results?
eg.
Code:
attempt to index field 'ThisNamedField' (a nil value)
ERROR: "Expected to find Sheep in this field."
Thanks
Still learning as I go.
