Jump to content

Recommended Posts

Posted (edited)

When I step through this part of my code I'm getting a "bad argument type: stringp nil" error at the "(substr pcbn 1" line, which is wierd, because when I add a watch to that expression everything looks legit. Anyway here's my code:

 

;;;  (setq ucbl     ;\
;;;  (vl-directory-files pcbl "*.dwg")  ;>This is the actual code of my program, but you don't have the file paths I use.
;;; )     ;/
 (setq ucbl '("1 - No Valet Note.dwg" "2 - Lines Test.dwg")) ;This is what ucbl is set to when I run the above code.
 (setq cbnl "New ?")
 (foreach pcbn ucbl
   (setq cbnl
   (strcat
     cbln
     " "
     (substr pcbn 1
      (vl-string-search " - " pcbn)
      )
     )
  )
   )

 

Any and all help would be greatly appriciated.

Edited by KRBeckman
spelling
Posted

Nevermind... this post can be deleted... I switched two letters in one of my variables.:oops:

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...