Post your entire code if you want help with it. Your snippet refers to a variable that may or may not be defined correctly or incorrectly or at all somewhere else, but you didn't post that part, so it really tells me nothing.
__________________
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.
|