Message 1 of 6

Not applicable
06-12-2021
10:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey Guys,
I'm trying to learn how if then statements work and how to implement them into existing lisps to clean them up. I have tried coding it myself with the help of a couple sites guides but to no avail. I cannot even get it to allow me to pick my first keyword. I have made an oversimplified example of how it should work in my head but it's clearly wrong. Could someone re-code this to do what I want? Code is pretty self explanatory.
(defun c:waiter (/ order1)
(setq order1 (initget 1 "Burger Steak" (getkword "What would you like to order?: ")))
(if(order1 burger) alert "Great Choice!")
(if(order1 steak) alert "How would you like it cooked?")
(princ)
)
Solved! Go to Solution.