Call signature does not match the function definition

General discussion on mikroC PRO for PIC.
Post Reply
Author
Message
poison3000
Posts: 1
Joined: 27 Nov 2010 16:26

Call signature does not match the function definition

#1 Post by poison3000 » 27 Nov 2010 16:51

Hi all ...

I have this problem whenever i try to "build" my project ..

Call signature does not match the function definition

my code is as follow:

Code: Select all

void RSSI (int, int, int, int, int);
void Align(int, int, int, int, int);

void main ()
{
 int Motors [] = { 0x01, 0x02, 0x04, 0x08 }; // array for contolling the motors
 int c;
 int x, r, l, SR;

 ADCON1 = 7; // configure PORTA as Digital
 TRISA = 1; // A ports as inputs
 TRISB = 0;  // B ports as outputs for right motor   4-bits
 TRISC = 0; // C ports as outputs for left motor     4-bits
 TRISD = 0; // D ports as outputs for antenna motor   4-bits

 PORTA = 0; // initialize PORTA
 PORTB = 0; // initialize PORTB
 PORTC = 0; // initialize PORTC
 PORTD = 0; // initialize PORTD

S1:  // start of main loop
 for (c = 1, x = 1 ; c <= 36 ; c++)
 {
   A:
       //if (PORTA.F2 == 1) goto S3;
       if (x >= 4) x = 0;
       PORTB = Motors [x];
       PORTC = Motors [x];
       PORTD = Motors [x];
       Delay_ms (1000);
       RSSI(c, x, r, l, SR);
       x++;
  } //end of main loop

  goto S1;
}

void RSSI (int c, int x, int r, int l, int SR)
{
 unsigned int ARSSI, BRSSI;
 ADCON1 = 0x80;  // Configure analog inputs and Vref

 ARSSI = Adc_Read (1);
 Delay_us(10);
 BRSSI = Adc_Read (2);
 Delay_us(10);
if (ARSSI == BRSSI) Align(c, x, r, l, SR);
}

Align (int c, int x, int r, int l, int SR)
{
 int Motors [] = { 0x01, 0x02, 0x04, 0x08 }; // array for contolling the motors
 //ADCON1 = 7; // configure PORTA as Digital

 if ( c >= 1 && c <= 18 )
    {
     for ( r = x,l = x ; c <= 1; c--)
          {
           r--;
           l++;
           if (r <= -1) r = 3;
           if (l >= 4) l = 0;
             PORTB = Motors [r];
             PORTC = Motors [l];
             PORTD = Motors [r];
             Delay_ms (1000);
           }   //end of loop where C >= 18
    } //end of 1st statement of IF
    {
     for ( r = x,l = x ; c <= 36; c++ )
         {
          r++;
          l--;
          if (l <= -1) l = 3;
          if (r >= 4) r = 0;
            PORTB = Motors [r];
            PORTC = Motors [l];
            PORTD = Motors [r];
            Delay_ms (1000);
         } // end of loop where C > 18
    } //end of 2nd statment of 2nd IF
}
the error msg points to this line of the code :
if (ARSSI == BRSSI) Align(c, x, r, l, SR);

also , i get the msg in purple :
Result is not defined in function: 'Align' Beta.c


please help me as soon as possible ..

thx in advance

User avatar
slavisa.zlatanovic
mikroElektronika team
Posts: 1321
Joined: 07 Apr 2009 09:39

Re: Call signature does not match the function definition

#2 Post by slavisa.zlatanovic » 29 Nov 2010 11:53

Hi!

You're missing one "void" here:

Code: Select all

void Align (int c, int x, int r, int l, int SR)
{
int Motors [] = { 0x01, 0x02, 0x04, 0x08 }; // array for contolling the motors
//ADCON1 = 7; // configure PORTA as Digital
...
Best regards
Slavisa

Post Reply

Return to “mikroC PRO for PIC General”