CONSTANT COMPILING ERRORS. PLEASE HELP!!!

I saved the error codes on a text editor and that’s what i’m going to use to upload to here so if looks kind of weird that’s why. But I have recently bought a 3d printer and i’m using the Arduino I.D.E. and for some reason all my sketches keep getting a compiling error. No matter what I try to do I seem to mess things up further it seems like. I haven’t been able to upload a single sketch since I first downloaded this. I don’t understand what I am doing wrong.

Arduino: 1.8.3 (Windows 10), Board: “Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)”

In file included from sketch\Marlin.h:21:0,

from sketch\ConfigurationStore.cpp:1:

sketch\fastio.h:1418:0: warning: “DIO73_PIN” redefined

#define DIO73_PIN PINJ4

^

sketch\fastio.h:1406:0: note: this is the location of the previous definition

#define DIO73_PIN PINJ3

^

In file included from sketch\Marlin.h:22:0,

from sketch\ConfigurationStore.cpp:1:

sketch\Configuration.h:613:8: warning: extra tokens at end of #endif directive

#endif __CONFIGURATION_H

^

In file included from sketch\ConfigurationStore.h:4:0,

from sketch\ConfigurationStore.cpp:5:

sketch\Configuration.h:613:8: warning: extra tokens at end of #endif directive

#endif __CONFIGURATION_H

^

In file included from sketch\Configuration.h:611:0,

from sketch\Marlin.h:22,

from sketch\ConfigurationStore.cpp:1:

sketch\thermistortables.h:72:1: warning: narrowing conversion of ‘2.405e+2’ from ‘double’ to ‘const short int’ inside { } [-Wnarrowing]

};

^

sketch\thermistortables.h:72:1: warning: narrowing conversion of ‘2.265e+2’ from ‘double’ to ‘const short int’ inside { } [-Wnarrowing]

sketch\thermistortables.h:72:1: warning: narrowing conversion of ‘2.225e+2’ from ‘double’ to ‘const short int’ inside { } [-Wnarrowing]

sketch\thermistortables.h:72:1: warning: narrowing conversion of ‘2.185e+2’ from ‘double’ to ‘const short int’ inside { } [-Wnarrowing]

sketch\thermistortables.h:72:1: warning: narrowing conversion of ‘2.135e+2’ from ‘double’ to ‘const short int’ inside { } [-Wnarrowing]

sketch\thermistortables.h:72:1: warning: narrowing conversion of ‘2.095e+2’ from ‘double’ to ‘const short int’ inside { } [-Wnarrowing]

sketch\thermistortables.h:72:1: warning: narrowing conversion of ‘1.955e+2’ from ‘double’ to ‘const short int’ inside { } [-Wnarrowing]

sketch\thermistortables.h:72:1: warning: narrowing conversion of ‘9.35e+1’ from ‘double’ to ‘const short int’ inside { } [-Wnarrowing]

sketch\thermistortables.h:72:1: warning: narrowing conversion of ‘7.35e+1’ from ‘double’ to ‘const short int’ inside { } [-Wnarrowing]

sketch\thermistortables.h:72:1: warning: narrowing conversion of ‘5.85e+1’ from ‘double’ to ‘const short int’ inside { } [-Wnarrowing]

sketch\thermistortables.h:72:1: warning: narrowing conversion of ‘4.85e+1’ from ‘double’ to ‘const short int’ inside { } [-Wnarrowing]

ConfigurationStore.cpp:246: error: expected ‘}’ at end of input

add_homeing[0] = add_homeing[1] = add_homeing[2] = 0;

^

In file included from sketch\Marlin.h:37:0,

from sketch\ConfigurationStore.cpp:1:

sketch\MarlinSerial.h: In member function ‘int MarlinSerial::available()’:

MarlinSerial.h:100: error: ‘rx_buffer’ was not declared in this scope

return (unsigned int)(RX_BUFFER_SIZE + rx_buffer.head - rx_buffer.tail) % RX_BUFFER_SIZE;

^

sketch\MarlinSerial.h: In member function ‘void MarlinSerial::write(uint8_t)’:

MarlinSerial.h:46: error: ‘UCSR4A’ was not declared in this scope

#define M_UCSRxA SERIAL_REGNAME(UCSR,SERIAL_PORT,A) // defines M_UCSRxA to be UCSRnA where n is the serial port number

^

sketch\MarlinSerial.h:41:61: note: in definition of macro ‘SERIAL_REGNAME_INTERNAL’

#define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix

^

sketch\MarlinSerial.h:46:18: note: in expansion of macro ‘SERIAL_REGNAME’

#define M_UCSRxA SERIAL_REGNAME(UCSR,SERIAL_PORT,A) // defines M_UCSRxA to be UCSRnA where n is the serial port number

^

sketch\MarlinSerial.h:105:17: note: in expansion of macro ‘M_UCSRxA’

while (!((M_UCSRxA) & (1 << M_UDREx)))

^

MarlinSerial.h:51: error: ‘UDRE4’ was not declared in this scope

#define M_UDREx SERIAL_REGNAME(UDRE,SERIAL_PORT,)

^

sketch\MarlinSerial.h:41:61: note: in definition of macro ‘SERIAL_REGNAME_INTERNAL’

#define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix

^

sketch\MarlinSerial.h:51:17: note: in expansion of macro ‘SERIAL_REGNAME’

#define M_UDREx SERIAL_REGNAME(UDRE,SERIAL_PORT,)

^

sketch\MarlinSerial.h:105:35: note: in expansion of macro ‘M_UDREx’

while (!((M_UCSRxA) & (1 << M_UDREx)))

^

It looks like you're probably using an old version of Marlin. Unless you have good reason to do otherwise, try using the latest release to see if that will help: https://github.com/MarlinFirmware/Marlin/releases

(deleted)

The compiler isn't broken, it must be the code. You didn't show us that.