You define the variable yttl (and use it successfully a number of times), but you do not define the variable yytl. Unless this variable is defined outside of this function in a global scope, that's the reason you are getting this error.
But that doesn't make sense to me as yttl is defined at the top of the function and as you verified it works several times. How come it works on line 20 but not 22
It's a typo - check every single character of the variable name: yttl vs. yytl or to spell it out, ONE "y" followed by two "t" vs. TWO "y" followed by one "t".
Because in line 20 you're accessing a variable called "yttl", not "yytl",
which is never defined.
You should consider using less confusing variable names to avoid such
problems in the future.
On Tue, Sep 22, 2015 at 8:24 PM, Sean.twyman <firstname.lastname@example.org>
OMG.. I knew it was something simple... I starred at it for 20 min and I couldn't figure it out. Thank you so much.