I'm having trouble debugging a nested if statement. Can anyone tell what is wrong. I'm sure it's a logic error on my part. I've labelled the area that won't work. Thanks for any help!
(if (= op1 'T)
(if (= cb1 'T)
(alert "Standard Outlet - 1/2 Hot")
(alert "Standard Outlet")
)
(if (= op2 'T)
;;-------------------- begin of failing statement
(if (cb2 'T)
(if (cb3 'T)
(alert "GFCI - Under Counter - WP")
(alert "GFCI - Under Counter")
)
(if (cb3 'T)
(alert "GFCI - WP")
(alert "GFCI")
)
)
;;-------------------- end of failing statement
(if (= op3 'T)
(if (= cb4 'T)
(alert "AFCI - 1/2 Hot")
(alert "AFCI")
)
)
)
)
(if (= op1 'T)
(if (= cb1 'T)
(alert "Standard Outlet - 1/2 Hot")
(alert "Standard Outlet")
)
(if (= op2 'T)
;;-------------------- begin of failing statement
(if (cb2 'T)
(if (cb3 'T)
(alert "GFCI - Under Counter - WP")
(alert "GFCI - Under Counter")
)
(if (cb3 'T)
(alert "GFCI - WP")
(alert "GFCI")
)
)
;;-------------------- end of failing statement
(if (= op3 'T)
(if (= cb4 'T)
(alert "AFCI - 1/2 Hot")
(alert "AFCI")
)
)
)
)