recognize missing argument
Posted: Thursday 07 July 2022 12:27
I have a function that is called from several places in LUA scripts, and I want to add a parameter to it.
In stead of going through all scripts and modify the call, I would like to handle this in the function, and assign a default value if the parameter is missing.
How can I check this? In other words, how can I test for a nil value?
In stead of going through all scripts and modify the call, I would like to handle this in the function, and assign a default value if the parameter is missing.
How can I check this? In other words, how can I test for a nil value?