If you're still getting that error, then it's not coming from the code snippets I posted, as it's literally not possible for either of those snippets to return a nil value, and the error you posted is being caused by a nil value.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
|