Are you limiting the range of Angle# from 0 to 360 degrees somewhere in your code?
Otherwise any values beyond what your checking will increment the year continuously..
Example:
Angle# = 0.0
Year = 0
Do
Cls
Angle# = Angle# + 0.05
If Angle# >= 360.0
Year = year + 1 : Angle# = 0.0
EndIf
Print Angle#
Print Year
Loop
I would normally suggest using the WRAPVALUE() function to limit the range to within
360 degrees, but for some reason it was acting quite strangely on my internet PC.
So, that is why I my example here doesn't make use of it.