I hate it when VB gives me absurd error messages that just can't apply according to VB's definition of the error message.
In the following 2 cases, I get error 6 "Overflow":
If val(vTimeOut(val(CurrentAlarm))) = 1 Then ' so if yes theres a timeout...
If TSLS = val(TimeOutDelay(val(CurrentAlarm))) And AlarmState = PlayingThen
Call AddLabMess("The alarm has timed out", "regular")
(the first line is the one that spawns the error - i number my lines for better troubleshooting)
If Retard > -1 Then Retard = Retard - 1
In both cases, this is just a if-then, there is not even a variable assignment so how can there be an overflow????
especially when help describes overflow this way (my angry comments in capitals):
"An overflow results when you try to make an assignment (I DON'T DO ANY ASSIGNMENT...) that exceeds the limitations of the target of the assignment. This error has the following causes and solutions:
The result of an assignment, calculation, or data type conversion is too large to be represented within the range of values allowed for that type of variable. (YEAH RIGHT, NUMBER "1" IS TOO LARGE)
Assign the value to a variable of a type that can hold a larger range of values. (I DON'T MAKE ASSIGNMENTS ON THESE LINES)
An assignment to a property exceeds the maximum value the property can accept. (YET AGAIN...)
Make sure your assignment fits the range for the property to which it is made."
Hope someone can make sense of it,