Error: expected initializer before 'int'

The project i am currently working on (automated humidifier) needs to be programmed. i found someone who had already completed this project online and though i would use their example to get started because i really know nothing about programming. the problem is this code has an error in the first line. can anyone help/ tell me what an expected initializer is?

void loop()

int 1 enum Mode {
   ModeNormal = 0,
   ModeSetting
 };
 Mode systemMode = ModeNormal;

 void updateEncoder9() {
  long newPosition = encoder.read();
  if (newPosition != target){
    if (systemMode == ModeSetting)
      target = newPostion;
  }
 }

 void updateData() {
  readSensors();

  if (correct && humidity <= (target - hysteresis))
    correct = false;
  else if (!correct && humidity >= (target + hysteresis))
    correct = true;

  refreshLEDs(correct);
  updateRelay(!correct);
  }

Arduino: 1.6.10 (Windows 10), Board: "Arduino/Genuino Uno"

C:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\arduino-builder -dump-prefs -logger=machine -hardware "C:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\hardware" -tools "C:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\tools-builder" -tools "C:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\hardware\tools\avr" -built-in-libraries "C:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\libraries" -libraries "C:\Users\user\Documents\Arduino\libraries" -fqbn=arduino:avr:uno -ide-version=10610 -build-path "C:\Users\user\AppData\Local\Temp\builde85287265e024ad9a0fc44346919d799.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\user\Documents\Arduino\humidifier_example\humidifier_example.ino"
C:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\arduino-builder -compile -logger=machine -hardware "C:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\hardware" -tools "C:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\tools-builder" -tools "C:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\hardware\tools\avr" -built-in-libraries "C:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\libraries" -libraries "C:\Users\user\Documents\Arduino\libraries" -fqbn=arduino:avr:uno -ide-version=10610 -build-path "C:\Users\user\AppData\Local\Temp\builde85287265e024ad9a0fc44346919d799.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\user\Documents\Arduino\humidifier_example\humidifier_example.ino"
Using board 'uno' from platform in folder: C:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\hardware\arduino\avr
Detecting libraries used...
"C:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\hardware\arduino\avr\cores\arduino" "-IC:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\hardware\arduino\avr\variants\standard" "C:\Users\user\AppData\Local\Temp\builde85287265e024ad9a0fc44346919d799.tmp\sketch\humidifier_example.ino.cpp" -o "nul"
"C:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\hardware\arduino\avr\cores\arduino" "-IC:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\hardware\arduino\avr\variants\standard" "C:\Users\user\AppData\Local\Temp\builde85287265e024ad9a0fc44346919d799.tmp\sketch\humidifier_example.ino.cpp" -o "nul"
Generating function prototypes...
"C:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\hardware\arduino\avr\cores\arduino" "-IC:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\hardware\arduino\avr\variants\standard" "C:\Users\user\AppData\Local\Temp\builde85287265e024ad9a0fc44346919d799.tmp\sketch\humidifier_example.ino.cpp" -o "C:\Users\user\AppData\Local\Temp\builde85287265e024ad9a0fc44346919d799.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\tools-builder\ctags\5.8-arduino10/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\user\AppData\Local\Temp\builde85287265e024ad9a0fc44346919d799.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\hardware\arduino\avr\cores\arduino" "-IC:\Users\user\Downloads\arduino-1.6.10-windows\arduino-1.6.10\hardware\arduino\avr\variants\standard" "C:\Users\user\AppData\Local\Temp\builde85287265e024ad9a0fc44346919d799.tmp\sketch\humidifier_example.ino.cpp" -o "C:\Users\user\AppData\Local\Temp\builde85287265e024ad9a0fc44346919d799.tmp\sketch\humidifier_example.ino.cpp.o"
humidifier_example:3: error: expected initializer before 'int'

int 1 enum Mode {

^

humidifier_example:7: error: 'Mode' does not name a type

Mode systemMode = ModeNormal;

^

C:\Users\user\Documents\Arduino\humidifier_example\humidifier_example.ino: In function 'void updateEncoder9()':

humidifier_example:10: error: 'encoder' was not declared in this scope

long newPosition = encoder.read();

^

humidifier_example:11: error: 'target' was not declared in this scope

if (newPosition != target){

^

humidifier_example:12: error: 'systemMode' was not declared in this scope

if (systemMode == ModeSetting)

^

humidifier_example:12: error: 'ModeSetting' was not declared in this scope

if (systemMode == ModeSetting)

^

humidifier_example:13: error: 'newPostion' was not declared in this scope

target = newPostion;

^

C:\Users\user\Documents\Arduino\humidifier_example\humidifier_example.ino: In function 'void updateData()':

humidifier_example:18: error: 'readSensors' was not declared in this scope

readSensors();

^

humidifier_example:20: error: 'correct' was not declared in this scope

if (correct && humidity <= (target - hysteresis))

^

humidifier_example:20: error: 'humidity' was not declared in this scope

if (correct && humidity <= (target - hysteresis))

^

humidifier_example:20: error: 'target' was not declared in this scope

if (correct && humidity <= (target - hysteresis))

^

humidifier_example:20: error: 'hysteresis' was not declared in this scope

if (correct && humidity <= (target - hysteresis))

^

humidifier_example:25: error: 'correct' was not declared in this scope

refreshLEDs(correct);

^

humidifier_example:25: error: 'refreshLEDs' was not declared in this scope

refreshLEDs(correct);

^

humidifier_example:26: error: 'updateRelay' was not declared in this scope

updateRelay(!correct);

^

exit status 1
expected initializer before 'int'

Fix this line

int 1 enum Mode {

And do again.

When you get a 1000 errors it's not normally as bad as it seems, start at the first one and after 2-3 they have usually all gone.

the problem is that i dont know what is wrong with this line, im not good with programming, im just using this as an example.

Graynomad:
Fix this line

int 1 enum Mode {

And do again.

When you get a 1000 errors it's not normally as bad as it seems, start at the first one and after 2-3 they have usually all gone.

Why is there "int 1" before the "enum Mode {"?

Either delete "int 1" or you missed a variable name, equal sign, and a semicolon. It should either be:

enum Mode {...}

or

int variable = 1;
enum Mode {

Take a look at enumerated types here.