Need help with a script

you can add print statments to debug the code and know why itnsot working
and can you add the code in Preformatted text because its hard to read

also i think it would be good if you used regoin3/zone+ for that as it will make it alot more simple