Sign in to follow this  

Need Help Programming my robot using VEX Easy C

This topic is 4194 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well here is my code:
#include "UserAPI.h"

int M1 = 0; 
int M2 = 0; 
int M3 = 0; 
int M4 = 0; 
int M5 = 0; 
int M6 = 0; 
int M7 = 0; 
int M8 = 0; 
int AD1 = 0; 
int AD2 = 0; 
int AD3 = 0; 
int AD4 = 0; 
int AD5 = 0; 
int AD6 = 0; 
int AD8 = 0; 
int AD9 = 0; 
int AD10 = 0; 
int AD11 = 0; 
int AD12 = 0; 
int AD13 = 0; 
int AD14 = 0; // Com 2 In
int AD15 = 0; // Com 2 out
int AD16 = 0; 
int RX11 = 0; 
int RX12 = 0; 
int RX13 = 0; 
int RX14 = 0; 
int RX15 = 0; 
int RX16 = 0; 
int RX21 = 0; 
int RX22 = 0; 
int RX23 = 0; 
int RX24 = 0; 
int RX25 = 0; 
int RX26 = 0; 
int DONE = 0; 
int AD7 = 0; 
int LOOP = 0; 
int VEXCOM = 0; 
int rc1 = 0; 
int rc2 = 0; 

void main ( void )
{
      Wait ( 1000 ) ;
      VEXCOM = 1 ; // Remember to change for other coms
      while ( LOOP == 0 )
      {
            AD1 = GetDigitalInput ( 1 );
            AD2 = GetDigitalInput ( 2 );
            AD3 = GetDigitalInput ( 3 );
            AD4 = GetDigitalInput ( 4 );
            AD5 = GetDigitalInput ( 5 );
            AD6 = GetDigitalInput ( 6 );
            AD7 = GetDigitalInput ( 7 );
            AD8 = GetDigitalInput ( 8 );
            AD9 = GetDigitalInput ( 9 );
            AD10 = GetDigitalInput ( 10 );
            AD11 = GetDigitalInput ( 11 );
            AD12 = GetDigitalInput ( 12 );
            AD13 = GetDigitalInput ( 13 );
            AD14 = GetDigitalInput ( 14 );
            AD15 = GetDigitalInput ( 15 );
            AD16 = GetDigitalInput ( 16 );
            LOOP = 1 ;
      }
      LOOP = 0 ;
      //Jumper For 2-Wheel Drive Gose On AD1
      //Jumper For 4-Wheel Drive Gose On AD2
      //Jumper For Catapolt Gose On AD3
      //Jumper For Crane 2-Motor Gose On AD4
      //Jumper For Crane 3-Motor Gose On AD5
      //Jumper For 2 Computers Gose On AD16
      //Jumper For Second Computer Output Gose On AD15
      //Jumper For Second Computer Input Gose On AD14
      //Jumper For RC Control On Computer One Gose On AD6
      //Jumper For RC Control On Computer Two Goes on AD7
      //Jumper For Extras On Computer Two Not One Gose on AD8
      //Jumper for bumpers and wiskers on the compter withe them goes on AD13
      //Bumpers and wiskers Goes On AD9-12 on both comsputers if needed
      if ( AD1 == 1 )
      {
            //2-motor drive
      }
      if ( AD2 == 1 )
      {
            //4-motor drive
      }
      if ( AD16 == 1 )
      {
            //2 Computers
            AD14 = 0 ;
            SetDigitalOutput ( 15 , 1 ) ;
            while ( LOOP = 0 )
            {
                  AD14 = GetDigitalInput ( 14 )
;)                  if ( AD14 == 0 )
                  {
                        PrintToScreen ( "Looking For Computer 2\n" ) ;
                        SetDigitalOutput ( 15 , 1 ) ;
                        LOOP = 0 ;
                  }
                  if ( AD14 == 1 )
                  {
                        PrintToScreen ( "Computer 2 Found\n" ) ;
                        LOOP = 1 ;
                  }
            }
            if ( AD8 == 1 )
            {
                  //Extras on com 2
            }
            else
            {
                  //extras on com 1
            }
      }
      else
      {
            //1 computer
      }
      if ( AD6 == 1 )
      {
            //RC on computer 1
            rc1 = 1 ;
      }
      else
      {
            rc1 = 0 ;
      }
      if ( AD7 == 1 )
      {
            //RC On Computer 2
            rc2 = 1 ;
      }
      else
      {
            rc2 = 0 ;
      }
      if ( rc1 == 0 && rc2 == 0 )
      {
            //Invalid cant have 2 RC's
            PrintToScreen ( "Please remove one RC Jumper and restart\n" ) ;
            LOOP = 1 ;
      }
      if ( rc1 == 1 && rc2 == 1 )
      {
            //No RC
            PrintToScreen ( "Cant use Extras\n" ) ;
      }
}

I put a, ;), by the line with the error can anyone find out why it's giving me an error, the error is: LINE#99: SYNTAX ERROR

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The line previous to the error does not have a semi colin, so the statement does not terminate and carries forward to the line that has the error. Put a semi colin before the line with the error.

good luck.

Share this post


Link to post
Share on other sites

This topic is 4194 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this