'dirPin' cannot be used as a function

The last sketch you posted does not have a call to dirPin, you are not showing the full code, all you gonna get is a lot of frustrated forum users that are trying to help. Count me out.