Can't declare an integer loop variable

I am starting to figure it out from this page http://deeplearning.net/software/theano/library/scan.html

so symbolic variables during scan declaration. real numpy arrays when calling the function.