Can anybody help me ?

Have a bug in my code, need help pls.
https://gist.github.com/1359646

Code is ported von vbasic

I added watch(“KI”) and KI was zero, possibly this is the issue

No… Thats not the right point.
Have make now a other, but cant find the bug here
https://gist.github.com/1360389