'dirPin' cannot be used as a function

inside a dirpin :

void dirpin()
{
    for (int i = 0; i < STEPS; i++) {
    // These four lines result in 1 step:
    digitalWrite(stepPin, HIGH);
    delayMicroseconds(500);
    digitalWrite(stepPin, LOW);
    delayMicroseconds(500);
    
    }
    }