Here’s how to properly share your code on the forums: Using code tags properly
By reading your error message you can easily find the problem. Your error is on line 51 as the error messages say. Note the (51, 20)
in the error messages. That means “Line 51, column 20”.
The problem is you have an if
there with no condition! An if statement needs to have a condition! Notice all of your other if statements have conditions like if (_dist < detectDistance)
but that one is just… empty!