My routine crash with stringp nil as error message, but when I do a debug in vlide it works. The list that is supposed to be nil got values in it and the code ran well. Can somebody help me?
@m.pepin wrote:My routine crash with stringp nil as error message, but when I do a debug in vlide it works. The list that is supposed to be nil got values in it and the code ran well. Can somebody help me?
You're passing a nil value variable to a function that requires a string argument , but i guess you already know that.
I would think the way you test the value for the varaible in question is by typing the variable name at the Visual Lisp console or !var at the command prompt. but. when you ran you;'re routine you declared that variable as local
(defun c:test (/ v1 v2 v3):<----- which crashes somehow
What you see when you recall the value for that variable is a "left-over" and not the value the routine is using.
try running your code on a new drawing then you will see varialbe in question
or to debug Tools-Break On Error- and Last Break Source (Ctrl+F9)
It would be easier If you post your code here. all it needs is fresh eyes.
Here's the code, problem is at line 269. When you click OK or Accept on a dialog box the subroutine (srv-chainchk) suppose to give you T but I get ERROR. Thank you for your help.
@m.pepin wrote:Here's the code, problem is at line 269. When you click OK or Accept on a dialog box the subroutine (srv-chainchk) suppose to give you T but I get ERROR. Thank you for your help.
Without being able to test your code (missing subs/DCL)
I could tell the problem one iof these lines
(list "hautgal" (get_tile "hautgal"))
(list "pentheo" (get_tile "pentheo"))
(list "haut_sol" (get_tile "haut_sol"))
(list "place_trav" (get_tile "place_trav"))
when you assign a none string value with (set_tile "pentheo" pentheo) and pentheo variable is nil and not ""
(get_tile "pentheo") will casue an error as it retrieves the current runtime value of a dialog box tile
Here's what I get when I put a break at line 269
and after a couple of step I get this
The list dialst is all set to nil. Hope it can help.
Thank you very much, but I've found my problem. It was the subroutine srv-chainchk that was defined in another lisp. So I have renamed srv-chaichk and now it works fine.
Thanks again.
@m.pepin wrote:Thank you very much, but I've found my problem. It was the subroutine srv-chainchk that was defined in another lisp. So I have renamed srv-chaichk and now it works fine.
Thanks again.
Oh..I see, now i felt sheepish enough not being to help you with your problem but the worst part is giving the wrong advise.
At any rate, good for you m.pepin.