Error: qualified-id in declaration before '(' token

I'm not experienced at programming, but I've been using Google Translate to update the Chinese comments, and add English equivalents in this vendor's massive code base and created a problem I can't find.. I wasn't intending to change ANY actual Arduino code, but apparently have. The question is where? Most of my new comments compiled without error since they were ignored in lines starting with "//" or were placed within "/* new comment here */ " The screen on the left is the new sketch that starts it's 1st errors with the new comments added ( and now fails) and the one on the right is unmodified and will compile with zero errors.. I have spent a pot of time truing to find the root source(s) of the problem but basically don't understand what the errors really mean has gone wrong or where.. I look at the 1st lines flagged in the text in error and the 1st line highlighted in RED some 1200 lines later and careful comparison so far shows no spot where I accidentally added or deleted a "(" or a "{" .. so any advice on how to resolve this would help a lot.. Thanks in advance jimS

Post code, not pictures.

Why does this still need to be said?

The code is massive, do you want the error code(s) or the source .ino or both and how much of it?

To answer: I was hoping a simple .jpg would clarify the limited scope of my query,

I'm on a phone ; a "simple JPEG" is illegible without a magnifier the size of Saturn.

Ok fair enough..
here is the current list of compiler errors: I hope I'm doing this correctly within these </> 's

Arduino: 1.8.19 (Windows 10), Board: "Arduino Uno"





















C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\jimsn\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\jimsn\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\jimsn\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10819 -build-path C:\Users\jimsn\AppData\Local\Temp\arduino_build_486442 -warnings=none -build-cache C:\Users\jimsn\AppData\Local\Temp\arduino_cache_461644 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\jimsn\Documents\Arduino\SmartRobotCarV4.0_V0_20210104withTab1and2CommentsErrors2\SmartRobotCarV4.0_V0_20210104withTab1and2CommentsErrors2.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\jimsn\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\jimsn\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\jimsn\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10819 -build-path C:\Users\jimsn\AppData\Local\Temp\arduino_build_486442 -warnings=none -build-cache C:\Users\jimsn\AppData\Local\Temp\arduino_cache_461644 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\jimsn\Documents\Arduino\SmartRobotCarV4.0_V0_20210104withTab1and2CommentsErrors2\SmartRobotCarV4.0_V0_20210104withTab1and2CommentsErrors2.ino

Using board 'uno' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr

Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr

Detecting libraries used...

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "C:\\Users\\jimsn\\AppData\\Local\\Temp\\arduino_build_486442\\sketch\\SmartRobotCarV4.0_V0_20210104withTab1and2CommentsErrors2.ino.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "C:\\Users\\jimsn\\AppData\\Local\\Temp\\arduino_build_486442\\sketch\\ApplicationFunctionSet_xxx0.cpp" -o nul

Alternatives for FastLED.h: [FastLED-master@3.2.10]

ResolveLibrary(FastLED.h)

  -> candidates: [FastLED-master@3.2.10]

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "C:\\Users\\jimsn\\AppData\\Local\\Temp\\arduino_build_486442\\sketch\\ApplicationFunctionSet_xxx0.cpp" -o nul

Alternatives for Servo.h: [Servo@1.1.8]

ResolveLibrary(Servo.h)

  -> candidates: [Servo@1.1.8]

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "C:\\Users\\jimsn\\AppData\\Local\\Temp\\arduino_build_486442\\sketch\\ApplicationFunctionSet_xxx0.cpp" -o nul

Using cached library dependencies for file: C:\Users\jimsn\AppData\Local\Temp\arduino_build_486442\sketch\DeviceDriverSet_xxx0.cpp

Using cached library dependencies for file: C:\Users\jimsn\AppData\Local\Temp\arduino_build_486442\sketch\I2Cdev.cpp

Alternatives for Wire.h: [Wire@1.0]

ResolveLibrary(Wire.h)

  -> candidates: [Wire@1.0]

Using cached library dependencies for file: C:\Users\jimsn\AppData\Local\Temp\arduino_build_486442\sketch\IRremote.cpp

Using cached library dependencies for file: C:\Users\jimsn\AppData\Local\Temp\arduino_build_486442\sketch\MPU6050.cpp

Using cached library dependencies for file: C:\Users\jimsn\AppData\Local\Temp\arduino_build_486442\sketch\MPU6050_getdata.cpp

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master\\FastLED.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master\\bitswap.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master\\colorpalettes.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master\\colorutils.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master\\hsv2rgb.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master\\lib8tion.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master\\noise.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master\\platforms.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master\\power_mgt.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master\\wiring.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src\\avr\\Servo.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src\\mbed\\Servo.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src\\megaavr\\Servo.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src\\nrf52\\Servo.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src\\sam\\Servo.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src\\samd\\Servo.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src\\stm32f4\\Servo.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src\\Wire.cpp" -o nul

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src\\utility\\twi.c" -o nul

Generating function prototypes...

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Users\\jimsn\\AppData\\Local\\Temp\\arduino_build_486442\\sketch\\SmartRobotCarV4.0_V0_20210104withTab1and2CommentsErrors2.ino.cpp" -o "C:\\Users\\jimsn\\AppData\\Local\\Temp\\arduino_build_486442\\preproc\\ctags_target_for_gcc_minus_e.cpp"

"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\jimsn\\AppData\\Local\\Temp\\arduino_build_486442\\preproc\\ctags_target_for_gcc_minus_e.cpp"

Compiling sketch...

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Users\\jimsn\\AppData\\Local\\Temp\\arduino_build_486442\\sketch\\ApplicationFunctionSet_xxx0.cpp" -o "C:\\Users\\jimsn\\AppData\\Local\\Temp\\arduino_build_486442\\sketch\\ApplicationFunctionSet_xxx0.cpp.o"

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\jimsn\\Documents\\Arduino\\libraries\\FastLED-master" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Servo\\src" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Users\\jimsn\\AppData\\Local\\Temp\\arduino_build_486442\\sketch\\SmartRobotCarV4.0_V0_20210104withTab1and2CommentsErrors2.ino.cpp" -o "C:\\Users\\jimsn\\AppData\\Local\\Temp\\arduino_build_486442\\sketch\\SmartRobotCarV4.0_V0_20210104withTab1and2CommentsErrors2.ino.cpp.o"

Using previously compiled file: C:\Users\jimsn\AppData\Local\Temp\arduino_build_486442\sketch\IRremote.cpp.o

Using previously compiled file: C:\Users\jimsn\AppData\Local\Temp\arduino_build_486442\sketch\I2Cdev.cpp.o

Using previously compiled file: C:\Users\jimsn\AppData\Local\Temp\arduino_build_486442\sketch\MPU6050_getdata.cpp.o

Using previously compiled file: C:\Users\jimsn\AppData\Local\Temp\arduino_build_486442\sketch\MPU6050.cpp.o

Using previously compiled file: C:\Users\jimsn\AppData\Local\Temp\arduino_build_486442\sketch\DeviceDriverSet_xxx0.cpp.o

In file included from C:\Users\jimsn\Documents\Arduino\SmartRobotCarV4.0_V0_20210104withTab1and2CommentsErrors2\DeviceDriverSet_xxx0.h:19:0,

                 from C:\Users\jimsn\Documents\Arduino\SmartRobotCarV4.0_V0_20210104withTab1and2CommentsErrors2\ApplicationFunctionSet_xxx0.cpp:14:

C:\Users\jimsn\Documents\Arduino\libraries\FastLED-master/FastLED.h:14:21: note: #pragma message: FastLED version 3.002.010

 #    pragma message "FastLED version 3.002.010"

                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~

C:\Users\jimsn\Documents\Arduino\SmartRobotCarV4.0_V0_20210104withTab1and2CommentsErrors2\ApplicationFunctionSet_xxx0.cpp: In member function 'void ApplicationFunctionSet::ApplicationFunctionSet_SensorDataUpdate()':

ApplicationFunctionSet_xxx0.cpp:370:59: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::ApplicationFunctionSet_Bootup(void)

                                                           ^

ApplicationFunctionSet_xxx0.cpp:376:1: error: a function-definition is not allowed here before '{' token

 {

 ^

ApplicationFunctionSet_xxx0.cpp:403:56: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::ApplicationFunctionSet_RGB(void)

                                                        ^

ApplicationFunctionSet_xxx0.cpp:543:59: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::ApplicationFunctionSet_Rocker(void)

                                                           ^

ApplicationFunctionSet_xxx0.cpp:552:61: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::ApplicationFunctionSet_Tracking(void)

                                                             ^

ApplicationFunctionSet_xxx0.cpp:636:61: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::ApplicationFunctionSet_Obstacle(void)

                                                             ^

ApplicationFunctionSet_xxx0.cpp:713:59: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::ApplicationFunctionSet_Follow(void)

                                                           ^

ApplicationFunctionSet_xxx0.cpp:814:58: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::ApplicationFunctionSet_Servo(uint8_t Set_Servo)

                                                          ^

ApplicationFunctionSet_xxx0.cpp:875:60: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::ApplicationFunctionSet_Standby(void)

                                                            ^

ApplicationFunctionSet_xxx0.cpp:913:46: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::CMD_inspect_xxx0(void)

                                              ^

ApplicationFunctionSet_xxx0.cpp:1032:51: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::CMD_MotorControl_xxx0(void)

                                                   ^

ApplicationFunctionSet_xxx0.cpp:1129:1: error: a function-definition is not allowed here before '{' token

 {

 ^

ApplicationFunctionSet_xxx0.cpp:1205:58: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::CMD_CarControlTimeLimit_xxx0(void)

                                                          ^

ApplicationFunctionSet_xxx0.cpp:1278:60: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::CMD_CarControlNoTimeLimit_xxx0(void)

                                                            ^

ApplicationFunctionSet_xxx0.cpp:1305:56: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::CMD_MotorControlSpeed_xxx0(uint8_t is_Speed_L, uint8_t is_Speed_R)

                                                        ^

ApplicationFunctionSet_xxx0.cpp:1330:56: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::CMD_MotorControlSpeed_xxx0(void)

                                                        ^

ApplicationFunctionSet_xxx0.cpp:1364:51: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::CMD_ServoControl_xxx0(void)

                                                   ^

ApplicationFunctionSet_xxx0.cpp:1383:63: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::CMD_LightingControlTimeLimit_xxx0(uint8_t is_LightingSequence, uint8_t is_LightingColorValue_R, uint8_t is_LightingColorValue_G, uint8_t is_LightingColorValue_B,

                                                               ^

ApplicationFunctionSet_xxx0.cpp:1431:63: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::CMD_LightingControlTimeLimit_xxx0(void)

                                                               ^

ApplicationFunctionSet_xxx0.cpp:1488:65: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::CMD_LightingControlNoTimeLimit_xxx0(uint8_t is_LightingSequence, uint8_t is_LightingColorValue_R, uint8_t is_LightingColorValue_G, uint8_t is_LightingColorValue_B)

                                                                 ^

ApplicationFunctionSet_xxx0.cpp:1504:65: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::CMD_LightingControlNoTimeLimit_xxx0(void)

                                                                 ^

ApplicationFunctionSet_xxx0.cpp:1529:56: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::CMD_ClearAllFunctions_xxx0(void)

                                                        ^

ApplicationFunctionSet_xxx0.cpp:1560:61: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::CMD_UltrasoundModuleStatus_xxx0(uint8_t is_get)

                                                             ^

ApplicationFunctionSet_xxx0.cpp:1599:56: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::CMD_TraceModuleStatus_xxx0(uint8_t is_get)

                                                        ^

ApplicationFunctionSet_xxx0.cpp:1674:63: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::ApplicationFunctionSet_KeyCommand(void)

                                                               ^

ApplicationFunctionSet_xxx0.cpp:1708:59: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::ApplicationFunctionSet_IRrecv(void)

                                                           ^

ApplicationFunctionSet_xxx0.cpp:1822:75: error: qualified-id in declaration before '(' token

 void ApplicationFunctionSet::ApplicationFunctionSet_SerialPortDataAnalysis(void)

                                                                           ^

ApplicationFunctionSet_xxx0.cpp:2083:1: error: expected '}' at end of input

 }

 ^

ApplicationFunctionSet_xxx0.cpp:2083:1: error: expected '}' at end of input

Using library FastLED-master at version 3.2.10 in folder: C:\Users\jimsn\Documents\Arduino\libraries\FastLED-master 

Using library Servo at version 1.1.8 in folder: C:\Program Files (x86)\Arduino\libraries\Servo 

Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire 

exit status 1

qualified-id in declaration before '(' token


Mostly I have been looking for a missing ")" or imbalanced pair of "{ / }" braces starting here at line 370, but also near the highlighted red line 1822 ..
should I copy paste all that here? or just say 10 lines of it in these two areas.. Main thing I'd like to know is what might be causing this error since I don't understand what it means.

      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\jimsn\Documents\Arduino\SmartRobotCarV4.0_V0_20210104withTab1and2CommentsErrors2\ApplicationFunctionSet_xxx0.cpp: In member function 'void ApplicationFunctionSet::ApplicationFunctionSet_SensorDataUpdate()':
ApplicationFunctionSet_xxx0.cpp:370:59: error: qualified-id in declaration before '(' token
 void ApplicationFunctionSet::ApplicationFunctionSet_Bootup(void)
                                                           ^
ApplicationFunctionSet_xxx0.cpp:376:1: error: a function-definition is not allowed here before '{' token
 {

That is saying:
In the file ApplicationFunctionSet_xxx0.cpp
you have a function called:
..._SensorDataUpdate
and inside that functon declaration you have a line (line 307) that says: "void ..._Bootup(void)

The compiler sees that you are trying to declare the '..._Bootup' function INSIDE the '..._SensorDataUpdate' function, and that is not valid C++. Usually this means you have an extra '{' or missing '}' in the '..._SensorDataUpdate' function declaration.

The compiler emphasizes the nature of the error with a further message:
"ApplicationFunctionSet_xxx0.cpp:376:1: error: a function-definition is not allowed here before '{' token"

John,
thank you so much for an exceptionally clear and useful reply.. I'll look into this carefully and hope like heck I'll find it . One thing I have learned from this exercise is to NEVER make ( as I did ) a lot of changes.. ( perhaps 50 this time ) to your code without re-compiling it and retesting .. Had I done this very simple set of mods incrementally.. I wouldn't be wasting so much time now trying to fixit..

Say I wanted to ask another semi-related question... This main .ino file I'm starting with took me a while to get to where it would pre-compile and actually load in the robot and Run and everything seems to be running Ok on the real hardware .. but when I look at the verbose compiler output I do se these 30? lines of red errors flagged but apparently none are show stoppers.. should I be worried or is this normal?
these are the types of things I see in Red in the "known-good factory fresh code:

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\main.cpp: In function 'main':
C:\Users\jimsn\Desktop\Elegoo INoFilese\New-Folder\ELEGOO Smart Robot Car Kit V4.0 2022.01.11\02 Manual & Main Program & APP\02 Main Program   (Arduino UNO)\TB6612 & MPU6050\SmartRobotCarV4.0_V1_20201229\ApplicationFunctionSet_xxx0.cpp:1669:5: warning: 'IRrecv_button' may be used uninitialized in this function [-Wmaybe-uninitialized]
     switch (IRrecv_button)
     ^
C:\Users\jimsn\Desktop\Elegoo INoFilese\New-Folder\ELEGOO Smart Robot Car Kit V4.0 2022.01.11\02 Manual & Main Program & APP\02 Main Program   (Arduino UNO)\TB6612 & MPU6050\SmartRobotCarV4.0_V1_20201229\ApplicationFunctionSet_xxx0.cpp:1660:11: note: 'IRrecv_button' was declared here
   uint8_t IRrecv_button;
           ^
C:\Users\jimsn\Desktop\Elegoo INoFilese\New-Folder\ELEGOO Smart Robot Car Kit V4.0 2022.01.11\02 Manual & Main Program & APP\02 Main Program   (Arduino UNO)\TB6612 & MPU6050\SmartRobotCarV4.0_V1_20201229\MPU6050_getdata.cpp:40:10: warning: 'cout' may be used uninitialized in this function [-Wmaybe-uninitialized]
     cout += 1;
          ^
C:\Users\jimsn\Desktop\Elegoo INoFilese\New-Folder\ELEGOO Smart Robot Car Kit V4.0 2022.01.11\02 Manual & Main Program & APP\02 Main Program   (Arduino UNO)\TB6612 & MPU6050\SmartRobotCarV4.0_V1_20201229\MPU6050_getdata.cpp:33:11: note: 'cout' was declared here
   uint8_t cout;
           ^

is this normal to have patches of red warnings, ? can I ignore them with confidence?

It is best to not have such warnings because it is not uncommon for a warning to be pointing out something that is syntactically valid but semantically questionable. For example, creating an uninitialized local variable and adding a value to it. That is easily fixed by adding an initializer to the definition.

Yeah right.. I was afraid of that... :roll_eyes: :joy:

John
I finally got the bugs out of the 2nd of 16 Tabs worth of .ino code.. I'll proceed with translating and updating the rest of them later but I'm back in a state where I can upload and successfully run the robot again.. May I ask a couple noob questions before I go? and mark this one as solved..
1.) this massive code is broken up logically into Tabbed sections and each is somehow linked to the code in other 15 sections. It all seems to compile together nicely, but I'm curious how are these separate tabs created. Seems like each time I create a new sketch it all lives under one tab.

2.) Is there as reference somewhere on how to translate these wild and woolie Compiler error notices? I'm assuming you should always start at the top and work down thru them, but find it odd that the 1st ones aren't often highlighted with a red line.. that red flag in my case was on a line thousand lines of code later. Yet most of what needed to be fixed was way above that flagged line..

BTW one of the issues was I did not realize the compiler will get confused if you happen to put two comments together like this as I was doing: " /* comment one / / comment two / you live and learn..btw: comment two reads "/ comment two /" but the editor here strips out the second "/" I suppose for a reason.. :stuck_out_tongue_winking_eye: :yum:

I have a document that I'll attach below that covers the most common errors you get from mismatched brackets.

The IDE highlights the topmost ERROR but does not highlight warnings at all. Except when it comes to undefined names, then it seems to highlight the last one. For multiply-defined names, you sometimes don't get any error until the linking phase.

Since one syntax error can cascade into more errors, it is generally good to start at the top. If you can't figure out that error, look at errors and warnings near there. In the case of a function not being defined ("was not declared in this scope"), check for errors near the place where the function is defined. If the function declration fails to compile then its name will not be defined.

Common compiler errors caused by mismatched brackets:

"does not name a type" or
"expected declaration before" or
"expected unqualified-id before" or
"expected initializer before" or
"expected constructor, destructor, or type conversion before '(' token"
Usually means you forgot a '{' or put in an extra '}' in the previous function. Since all of the open brackets have been closed, the compiler is looking for further global declarations (variables or functions). If it finds something that looks like executable code instead of a global declaration it emits an error. Make sure that the brackets in the preceding function are in matching pairs '{' followed by '}'.

"a function-definition is not allowed here before '{' token"
(can cause: "'functionName' was not declared in this scope")
Usually means you forgot a '}' or put in an extra '{' in the previous function. Since a set of brackets has not been closed yet the compiler is looking for more code to put in the function. You can't declare a function inside a function so if the compiler finds a function declaration it emits an error. Make sure that the brackets in the preceding function are in matching pairs '{' followed by '}'.

"expected '}' at end of input"
Usually means you forgot a '}' or put in an extra '{' in the last function in the sketch. Since a set of brackets has not been closed yet, the compiler is looking for more code to put in the function. When it hits the end of the file instead, it emits an error. Make sure that the brackets in the last function are in matching pairs '{' followed by '}'.

"expected primary-expression before '}' token"
Usually means you have an incomplete statement before a '}'. The block statement (between '{' and matching '}') can only contain complete statements. Complete statements always end with ';' (or '}' for a block statement).

John,
This reply has really helped me a lot..thank you!

I think you’ve earned your Karma 2001 rating on this one ..

I’m saving this reply since I’m afraid I’ll run across one or more of these soon enough.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.