I want to use keyword "return" to return value for a function but I got a runtime error

I can only successfully return value as below. However, the function will not "end directly" after if condition == true at line #3.
Could someone give a hint how to use "return" keyword correctly?

AutoLISP does not have a
returnfunction.You would need to structure your code such that the remainder of the code is evaluated as part of the
elseargument for theifstatement, e.g.:But I might write the function as follows: