I am getting a very frustrating error where a variable in my code does "not have a value". Here is a picture of my code with the debugger information at the bottom.
My original code only has the red squares, but I added in the blue square "Xmax = 40" just to see if i could force a value into the variable. Obviously you can see there is still a problem. Any insight into why I am getting this error?