I think hes confused about these Values (Pan/Tilt)... Add in the first line

Code:
my.pan%=360;
my.tilt%=360;


cYa Sebastian


Tutorials:
[Blender]Terrain creation ENG/GER
[Blender]Low Poly Tree Modeling
[GIMP]Create a Texture for Terrains
CLICK HERE