in reply to
Variable Scope Issue?
I cut & pasted your code in a text editor to find the famous line 88, but line 88 is a blank line.
So you tell us that you have cut out some parts of the script. That makes it very difficult to make use of the error message you supplied.
So you say that this may not even be the script generating the error message. ("May have been edited again.")
You know, you really don't provide a lot to go on. I gave it a quick look but didn't immediately find any problem. (I may have missed it.) I stopped looking when I started to think of what you're really asking for:
"This script is not the one that gave the error, can you help me to find the error?"
Everything went worng, just as foreseen.