to-report check-wall hatch 1[ set color grey set size ([size] of one-of walls) / 2 while [distance myself < (2 * ([size] of myself)) and (pycor + ([size] of one-of walls) / 2) < max-pycor ] [ fd ([size] of one-of walls) / 2 if any? walls in-radius size [ report true ] ] die ] report false
REPORT must be immediately inside a TO-REPORT. error while inboxturtle 260 running REPORT called by procedure CHECK-WALL
Please ignore the functionality of the code. I didn't elaborate it because I don't think it would be required. Note: I wish that when inner if is true it stop the method and return. Thus, creating a variable and setting it true in that if and then returning at the end is not a likely option.