Bi-Directional person counter

sensorATriggered boolean = false;

if (currStateA! = prevStateA)And what happened when you tried to compile it?