Need help with tic-tac-toe

Alright, I have quite some trouble here, can't come up with anything. I need code that would check if there is already a symbol placed in the specified cell, and if yes, prompt to input correct coordinates. Here's the code: