Arduino - 'setLocked' was not declared in this scope

If you put the cursor to the immediate right of any {, }, ( or ) the matching symbol (as the IDE sees matches) will be highlighted if there is a matching symbol. Also, if you put every { and } on its own line, mismatches are easier to see, especially after an autoformat operation.

If(something)
{
  doThis();
}
else
{
  doThat();
}