Author Topic: I'm blind today or something  (Read 278 times)

0 Members and 1 Guest are viewing this topic.

jlogan02

  • Bull Frog
  • Posts: 275
I'm blind today or something
« on: May 05, 2022, 04:31:59 PM »
I'm getting an "extra right paren" error. For the life of me I can't see it. I've just started using Visual Studio Code
and like the fact that it's showing the last closed paren (defun) in red, indicating something is wrong.

Help says to...
Click to the right of an open parenthesis or left of a closing parenthesis, and press Shift+Alt+RightArrow 2 (or 3) times. As I see it, the error is somewhere in my "error" handler, but I'm not seeing it.

Code - Auto/Visual Lisp: [Select]
  1. (defun C:LayGrpFltr ( / *error* )
  2.     (defun *error* ( msg )
  3.         (if (not (member msg '("Function cancelled" "quit / exit abort")))
  4.             (princ (strcat "\nError: " msg))
  5.         )
  6.         (princ)
  7.     )
  8.  
  9.     (rtos (getreal "\nPress Esc to exit, press Enter to force an error ..."))
  10.     (princ)
  11.     )
  12.     (setvar 'cmdecho 0)
  13.  
  14.         (command "._layer" "Make" "TBLK_BORD_LINES" "C" "WHITE" "TBLK_BORD_LINES" "")
  15.         (command "._layer" "Make" "TBLK_BORD_TEXT" "C" "GREEN" "TBLK_BORD_TEXT" "")
  16.         (command "._layer" "Make" "TBLK_TBLK_LINES" "C" "9" "TBLK_TBLK_LINES" "")
  17.         (command "._layer" "Make" "TBLK_TBLK_REFTEXT" "C" "GREEN" "TBLK_TBLK_REFTEXT" "")
  18.         (command "._layer" "Make" "TBLK_TBLK_REVLINES" "C" "9" "TBLK_TBLK_REVLINES" "")
  19.         (command "._layer" "Make" "TBLK_TBLK_REVTEXT" "C" "GREEN" "TBLK_TBLK_REVTEXT" "")
  20.         (command "._layer" "Make" "TBLK_TBLK_TEXT" "C" "CYAN" "TBLK_TBLK_TEXT" "")
  21.         (command "._layer" "Make" "IPCO" "C" "CYAN" "IPCO" "")
  22.         (command "._layer" "Make" "MFG" "C" "YELLOW" "MFG" "")
  23.         (command "._layer" "Make" "CLOUD" "C" "RED" "CLOUD" "")
  24.         (command "._layer" "Filter" "New" "Group" "" "TBLK_*" "ATT TBLK Layers" "")
  25.         (command "._layer" "Filter" "New" "Group" "" "FiberMgt,IPCO,Line0,Line1,Line2,Line3,Line4,Line5,MFG,Text0,Text1,Text2,Text3,Text4,Text5,Dimen,CLOUD,Image" "Stations Standard Layers" "")
  26.           (command "._layer" "Make" "LINE1" "color" "Yellow" "IPCO" "LOCK" "TBLK_BORD_LINES" "S" "LINE1" "")
  27.  
  28.         (setvar 'cmdecho 1)
  29.   (princ)
  30. )
J. Logan
ACAD 2018

I am one with the Force and the Force is with me.
AutoCAD Map 2018 Windows 10

steve.carson

  • Newt
  • Posts: 97
Re: I'm blind today or something
« Reply #1 on: May 05, 2022, 04:34:25 PM »
Line 11?

jlogan02

  • Bull Frog
  • Posts: 275
Re: I'm blind today or something
« Reply #2 on: May 05, 2022, 04:57:36 PM »
Beat me to it!!! I just found it myself. Thanks.

As an aside, in Visual Studio Code, I just discovered you can just put the cursor to the right of an open or left of a closed paren and it will highlight the matching paren.
J. Logan
ACAD 2018

I am one with the Force and the Force is with me.
AutoCAD Map 2018 Windows 10

jlogan02

  • Bull Frog
  • Posts: 275
Re: I'm blind today or something
« Reply #3 on: May 05, 2022, 04:59:11 PM »
Or left of an open, right of a closed...
J. Logan
ACAD 2018

I am one with the Force and the Force is with me.
AutoCAD Map 2018 Windows 10