(defun c:zoo () ;; also, you can localized the all variables from code (/ pt) to be set as default (nil) before next execution.
;; (if (setq a (entlast))
;; (while
;; (setq b (entnext a))
;; (setq a b)
;; )
;;)
;;(setq ent (entget a))
;;(setq po (assoc 10 ent))
;;(setq pt (cdr po))
(setq pt (cdr (assoc 10 (entget (entlast))))) ;; this line substitue the 9 lines of code from above.
;;(command "zoom" "c" pt 50 "") --> delete the last "" after 50, because you are calling again "zoo" command
(command "zoom" "c" pt 50)
)
I put a some description in your code, hope it will be helpful.