schedule method-call + while loop

hi
I'm trying to do this:

while r<30:{
self schedule method-call "test" at-time r.
}

and in the method test I increase r, but I don't know why, every time that I run it, breve program show me a message error and close.
What I'm doing wrong? Can anybod help me?
thanks