'run' was not declared in this scope So I am using arduino software 1.8.4

So I am using arduino software 1.8.4 and I have the adafruit v1 motorshield + adafruit motorshield v1 library and when I try to upload my code I get this error
‘run’ was not declared in this scope
How can I fix this?

Here is my code:

#include <AFMotor.h>

AF_DCMotor bal(1, MOTOR12_8KHZ);
AF_DCMotor jobb(2,MOTOR12_8KHZ);

#define trig 2
#define echo 4
int dur;
long dis;

void setup() {
// put your setup code here, to run once:
pinMode(trig, OUTPUT);
pinMode(echo, INPUT);
Serial.begin(9600);
}

void loop() {

digitalWrite(trig, LOW);
delayMicroseconds(2);
digitalWrite(trig, HIGH);
delayMicroseconds(10);
digitalWrite(trig, LOW);
dur = pulseIn(echo, HIGH);
dis = dur*0.034/2;
Serial.print("Távolság cm: ");
Serial.print(dis);
delay(1000);
if (dis > 20)
{
run.jobb(FORWARD);
run.bal(FORWARD);

}
else if (dis <20)
run.bal(BACKWARD); //Here are the errors
run.jobb(BACKWARD);
}

You don't have a class or struct called run. Did you mean bal.run?

Please remember to use code tags when posting code. You've been asked before

yes but it is in the library I have been using this library and it was working but it was a few weeks ago…

No, that code never worked.

By bal and jobb I mean the motors names

No, you mean the object names.

Please see reply #1

so will it work if I make a struct?

Well it might, but why would you?

Just reverse "run.bal" to be "bal.run"

thank you it works now it was a big mistake from me :)

nice one