en variable is emtpy , and user still went ahead and select the block, that is why (sslength en) will produce that error
You can remove "X" to enable the user to select on sceen
Make sure the selection is under the same layer listed as the filter
(setq en (ssget "X" ;<-- this for selection mode
(list
(cons 0 "ARC,CIRCLE,ELLIPSE,LINE,LWPOLYLINE,POLYLINE,SPLINE")
(cons 8 "A-WALL-INTR") ; <--- that layer name
))
)
BTW: the lisp code is not that exciting at all