Do you get the error "Too Many Arguments" after you run the lisp command?
If there are sub-functions on your code and its global [ outside your defined function ] and another lisp file has the same sub functin name but with one or two less required arguments
Code:
;; The questionable lisp file ;;;
(defun _banana ( a b )
(strcat a " and " b))
(defun c:test ( / please check your subfunc)
(setq one (getstring "\nEnter something: "))
(setq two (getstring "\nEnter something: "))
(princ (_banana one two))
(princ)
)
Code:
Command: TEST
Enter something: 12
Enter something: 45
12 and 45
Code:
;; Lisp file loaded AFTER the questionable lisp file ;;;
(defun _banana ( a )
(strcat a " is something you type"))
(defun c:test2 ( / please check your subfunc)
(setq three (getstring "\nEnter something: "))
(princ (_banana three))
(princ)
)
Code:
Command: TEST2
Enter something: 34
34 is something you type
BUT
Code:
Command: TEST
Enter something: ant
Enter something: seb
; error: too many arguments
Code:
;; prefered way is localizing the sub ;;;
(defun c:test ( / _banana please_check your_subfunc)
(defun _banana ( a b )
(strcat a " and " b))
(setq please_check (getstring "\nEnter something: "))
(setq your_subfunc (getstring "\nEnter something: "))
(princ (_banana please_check your_subfunc))
(princ)
)
If the subfunction is the same company-wide, you can make it global but use a unique like PBE:MySubForThis,