as you wouldn't want it to simply exit?
unless they hit escape, which we'll get to another time.
Glad you asked otherwise. There are a number of ways. First I'm going to show you a simple one.
(while (not (setq txtentity (car (entsel "\nSelect text: "))))
(princ "\nYou missed. Try again.")
)
(setq txtlist... etc.)
Try that out a bit.
Evaluates a test expression, and if it is NOT nil, evaluates other expressions; repeats this process until the test expression evaluates to nil
IOW, taking the above example, while txtentity is not true (or returns nil) let the user know and repeat this test until the user picks an object. Does that help?
Now, test this out a bit. It still has a bug. Entsel has this problem where it allows you to pick any object and there seems to be no way of letting it know you want to force your user to only select a certain type of object. We'll tackle that one when we get a bit further down the road okay. As for now, have you noticed, we're taking on two birds with one stone.
dive into the function and show where errors are likely to occur and discuss ways to overcome them.
work looping into code where necessary
There are three places we'll do some iterating/looping. I want you to make the next move on making sure a user doesn't miss. Post your code. Test out each block. Miss on purpose, just to see it in action. That will help it all click. After you do that, we'll see what we can do to make the whole thing get real loopy :horror: