Quote Originally Posted by Petr Schreiber
Thanks Mike,

what was the reason of trouble?


Petr
The reason was not thinking before I changed it

I switched the following IF Structures

[code=thinbasic] If @currEvent.intervalcount <> 0 Then
While @currEvent.starttime <= time
@currEvent.starttime = time + @currEvent.intervaltime
Wend
End If
If @currEvent.intervalcount > 0 Then
@currEvent.intervalcount = @currEvent.intervalcount - 1
If @currEvent.intervalcount = 0 Then @currEvent.repeatFlag = %FALSE
End If
[/code]

Sorry
Michael