November 21, 200124 yr After updating my solution, I get a "cannot find script or script has been deleted" error, but still carries out script. I reformatted the button to play script, redid the script with same error. Only set error capture on elliminated the message. Any ideas as to why I was getting the error? script read: Copy(Select, Record#) Perform Script(subscripts, Add Payment)
November 22, 200124 yr Hey kens. Check your Add Payment script to see if any of the Perform Script steps don't specify a script. Then, check those scripts for the same thing. Paul
November 22, 200124 yr If you set error capture ON, be sure to capture the error and handle it. Otherwise items can fail with no warning. HTH Old Advance Man
November 23, 200124 yr Author I cannot seem to find any script error... I even tried re-doing all the scripts and external scripts and still same error. With set error capture on, all runs ok...how do I capture the error if there is one?
November 24, 200124 yr quote: Originally posted by kens: I cannot seem to find any script error... I even tried re-doing all the scripts and external scripts and still same error. With set error capture on, all runs ok...how do I capture the error if there is one? In a situation like this, I liberally sprinkle Show Message steps in my script with a brief description of what I expect the script to do next. It may help you pinpoint where your script is breaking. As for error capturing, the Status(CurrentError) function returns the error code for the most recent script step only. I tend to enclose Script Steps most likely to cause errors (e.g. Find, Print, etc.) with Set ErrorCapture, and within that I have a conditional statement (e.g. If Status(CurrentError)<>0) to handle any errors.
November 24, 200124 yr quote: Originally posted by The Bridge: In a situation like this, I liberally sprinkle Show Message steps in my script with a brief description of what I expect the script to do next. It may help you pinpoint where your script is breaking. As for error capturing, the Status(CurrentError) function returns the error code for the most recent script step only. I tend to enclose Script Steps most likely to cause errors (e.g. Find, Print, etc.) with Set ErrorCapture, and within that I have a conditional statement (e.g. If Status(CurrentError)<>0) to handle any errors. There are specific errors, and there is a list of soem of them in the on-line Help. To capture the exact error, create a global field of the type number. Immediately after the event that might cause the error, Use a Set Field into that global with Status(CurrentError). This does not apply to ODBC. ODBC has its own error step. HTH Old Advance Man
Create an account or sign in to comment