Get Analog for two myoware devices at once.

I am creating a programme in which two Myoware devices are programmed at once. This is the programme:

const int iSensorPin = A1;
const int iMinThreshVal = 1;
const int iMaxThreshVal = 3000;
const int iSensor = A0;
const int iMinThreshVal1 = 1;
const int iMaxThreshVal1 = 3000;
void setup()
{
    Serial.begin(115200); //Data rate needed
    }
    void loop()
{

    int val = getAnalog(A0);                    // get Analog value
    int iSensorVal=getAnalog(iSensor);
    int val = getAnalog(A1);                    // get Analog value
    int iSensorVal=getAnalog(iSensorPin);
      Serial.print(iSensorVal); //To Allow a live log.
      Serial.print(" ");
      Serial.println(iSensorVal1);
         
    delay(10);
}

However, I get these error messages:

C:\Users\Robin\Documents\Arduino\new_arduino_sketch_for_emg\new_arduino_sketch_for_emg.ino: In function 'void loop()':

new_arduino_sketch_for_emg:14: error: 'getAnalog' was not declared in this scope

     int val = getAnalog(A0);                    // get Analog value

                           ^

new_arduino_sketch_for_emg:16: error: redeclaration of 'int val'

     int val = getAnalog(A1);                    // get Analog value

         ^

new_arduino_sketch_for_emg:14: error: 'int val' previously declared here

     int val = getAnalog(A0);                    // get Analog value

         ^

new_arduino_sketch_for_emg:17: error: redeclaration of 'int iSensorVal'

     int iSensorVal=getAnalog(iSensorPin);

         ^

new_arduino_sketch_for_emg:15: error: 'int iSensorVal' previously declared here

     int iSensorVal=getAnalog(iSensor);

         ^

new_arduino_sketch_for_emg:20: error: 'iSensorVal1' was not declared in this scope

       Serial.println(iSensorVal1);

                      ^

exit status 1
'getAnalog' was not declared in this scope

Can someone explain what must be done to correct the code?

Can someone explain what must be done to correct the code?

Create a getAnalog() function would seem the obvious solution.

There are other problems too, such as the redeclaration of the val variable. How about having 2 variables named val0 and val1 ?

  Serial.println(iSensorVal1);Have you actually got a variable named iSensorVal1 ?

I'm wondering if somehow you made an imaginary function getAnalog where you actually meant analogRead?

the other errors point to your (assumed typo) code here:

    int val = getAnalog(A0);                    // get Analog value
    int iSensorVal=getAnalog(iSensor);
    int val = getAnalog(A1);                    // get Analog value
    int iSensorVal=getAnalog(iSensorPin);
      Serial.print(iSensorVal); //To Allow a live log.
      Serial.print(" ");
      Serial.println(iSensorVal1);

you cannot declare two like-named variables in the same scope.

the compiler errors you posted couldn't be any more clear!