jdickinsonarduino:
Automobile_Deterrent:131: error: a function-definition is not allowed here before '{' token
Automobile_Deterrent:138: error: expected}' at end of input Automobile_Deterrent:138: error: expected}' at end of input
You have some bracket errors.
I think that it's easier to see where your brackets are amiss if you adopt "our" convention, each bracket on a line by itself:
void loop ()
{
something
or other
if (whatever)
{
this and that
}
}
That way they're stacked up like, a little more obvious.
[ I don't see where the problem is right now, because... I don't have access to the IDE right now. ]