Invalid conversion value issue?

Hey All! I'm very new to Arduino and my code is running into a problem and I'm unsure what it is. The error message that came up when I was verifying the sketch was

In function 'void analyzeSample()':
warning: invalid conversion from 'int' to 'int*' [-fpermissive]
setnote = scaleNote(setnote, *scale[currScale], root); //scale the note
note: initializing argument 2 of 'int scaleNote(int, int*, int)'
int scaleNote(int note, int scale, int root) {

Any and all help is greatly appreciated! Thank you so much

void analyzeSample()
  //eating up memory, one long at a time!
  unsigned long averg = 0;
  unsigned long maxim = 0;
  unsigned long minim = 100000;
  float stdevi = 0;
  unsigned long delta = 0;
  byte change = 0;

  if (index == samplesize) { //array is full
    unsigned long sampanalysis[analysize];
    for (byte i=0; i<analysize; i++){ 
      //skip first element in the array
      sampanalysis[i] = samples[i+1];  //load analysis table (due to volitle)
      //manual calculation
      if(sampanalysis[i] > maxim) { maxim = sampanalysis[i]; }
      if(sampanalysis[i] < minim) { minim = sampanalysis[i]; }
      averg += sampanalysis[i];
      stdevi += sampanalysis[i] * sampanalysis[i];  //prep stdevi

    //manual calculation
    averg = averg/analysize;
    stdevi = sqrt(stdevi / analysize - averg * averg); //calculate stdevu
    if (stdevi < 1) { stdevi = 1.0; } //min stdevi of 1
    delta = maxim - minim; 
    //**********perform change detection 
    if (delta > (stdevi * threshold)){
      change = 1;
    if(change){// set note and control vector
       int dur = 150+(map(delta%127,1,127,100,2500)); //length of note
       int ramp = 3 + (dur%100) ; //control slide rate, min 25 (or 3 ;)
       int notechannel = random(1,5); //gather a random channel for QY8 mode
       //set scaling, root key, note
       int setnote = map(averg%127,1,127,noteMin,noteMax);  //derive note, min and max note
       setnote = scaleNote(setnote, *scale[currScale], root);  //scale the note
       // setnote = setnote + root; // (apply root?)
       if(QY8) { setNote(setnote, 100, dur, notechannel); } //set for QY8 mode
       else { setNote(setnote, 100, dur, channel); }
       //derive control parameters and set    
       setControl(controlNumber, controlMessage.value, delta%127, ramp); //set the ramp rate for the control
     //reset array for next sample
    index = 0;

int scaleSearch(int note, int scale[], int scalesize) {
 for(byte i=1;i<scalesize;i++) {
  if(note == scale[i]) { return note; }
  else { if(note < scale[i]) { return scale[i]; } } //highest scale value less than or equal to note
  //otherwise continue search
 //didn't find note and didn't pass note value, uh oh!
 return 6;//give arbitrary value rather than fail

int scaleNote(int note, int scale[], int root) {
  //input note mod 12 for scaling, note/12 octave
  //search array for nearest note, return scaled*octave
  int scaled = note%12;
  int octave = note/12;
  int scalesize = (scale[0]);
  //search entire array and return closest scaled note
  scaled = scaleSearch(scaled, scale, scalesize);
  scaled = (scaled + (12 * octave)) + root; //apply octave and root
  return scaled;

Well the compiler seems unhappy about this

What’s scale‘s type? Why the star?

What's the type of scale[] and what type is expected by scaleNote()?

I think I accidentally added an asterisk when I was typing and deleting it fixed it! thank you so much for your help!

details matters :wink:

the compiler often gives good hints!

... yeah so simple mistake... * indicates a pointer... which is quite a different beast.