Cancel on prompt boxes

This is my first time editing a file, but i had the problem prompt boxes couldn't be cancelled (and also the other cancelable didn't really cancel) so i changed a few things as you can see... Hope i will help you!

Maybe i'm all wrong, don't know for sure..