Help with a simple project

Eduffleck:
Thank you for the help, it works fine now!

Why do you need to read the position that the servo was last sent to ?
After all, your code commanded to move there.

If you use a variable to hold the commanded servo position then you can use that value in any test of servo position.