jim_archi4 Posted November 18, 2011 Posted November 18, 2011 (edited) Hi I have this sub routine attached to a reactor, for recording my Acad session. The routine works fine except when I choose not to record the "Data Ignored" prompt does not come up, only the "Saving data" prompt comes up regardless of saving or not. Can anyone help me here. NB" PLEASE DON'T BUST MY BALL I DON'T KNOW HOW TO INSERT MY CODE IN ITS CORRECT LOCATION; (someone coluld help that too) Code; (defun ActionToAnswer ( );;;Triggered Thiscommand (If (or (= ans "yes") (= ans Nil) (= ans "") (="y")) (progn (princ "\nSaving data....") (diary) ) (princ "\nData ignored....") ) ) Edited November 18, 2011 by SLW210 Add tag and bust ball Quote
ketxu Posted November 18, 2011 Posted November 18, 2011 Please put [ code] at start and [ /code] at end of your code, or highlight then pick # icon in your editor Quick Reply (defun ActionToAnswer ( );;;Triggered Thiscommand (If (or (= ans "yes") (not ans) (= ans "") (= [color=red]ans[/color] "y")) ;[color=red]Put ans here, if only (= "y") => always return T, then you always do Saving data....[/color] (progn (princ "\nSaving data....") (diary) ) (princ "\nData ignored....") ) ) Quote
BlackBox Posted November 18, 2011 Posted November 18, 2011 Your function does not require "ans" as an argument, and is not defined within the function, thus will return T at = nil condition (if not globally defined elsewhere). You must define the variable, or supply as an argument. Quote
SLW210 Posted November 18, 2011 Posted November 18, 2011 I did the Code Tag for you this time. Read THIS for next time. Quote
BlackBox Posted November 18, 2011 Posted November 18, 2011 ... You wouldn't like SLW when he's angry. Just saying. Quote
resullins Posted November 18, 2011 Posted November 18, 2011 ... You wouldn't like SLW when he's angry. Just saying. Is not putting your code iin tags the only way to **** him off? Just curious. I'm still learning how to write code, so I've never run into that. Quote
Tharwat Posted November 18, 2011 Posted November 18, 2011 Is not putting your code iin tags the only way to **** him off? Just curious. I'm still learning how to write code, so I've never run into that. Does it mean that you are running into two accounts ???? Quote
BlackBox Posted November 18, 2011 Posted November 18, 2011 Is not putting your code iin tags the only way to **** him off? Just curious. I'm still learning how to write code, so I've never run into that. Let's find out... "Show us your [code]!" Being serious, everyone started somewhere when first learning to code; it takes serious work to "get good" at coding (that's why my skills are lacking! LoL). Mistakes are a given, correction(s) usually follow... Just learn from the experience. That's at least what I personally strive for... regardless of how poorly I live up to that expectation. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.