serial does not name a type

Trying to control DMX with touchOSC though an Arduino Mega 2560 and ethernet shield w5100. Suddenly encountered this problem while loading an ethernet example.

You're a bit short on details, but try Serial instead.

"serial" or "Serial"?

sorry, error message failed to attach previously

serial.pdf (53 KB)

Compiling sketch... "/Users/caseyburdick/Downloads/Arduino.app/Contents/Java/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=atmega2560 - DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_MEGA2560 - DARDUINO_ARCH_AVR "-I/Users/caseyburdick/Downloads/Arduino.app/Contents/ Java/hardware/arduino/avr/cores/arduino" "-I/Users/caseyburdick/Downloads/ Arduino.app/Contents/Java/hardware/arduino/avr/variants/mega" "-I/Users/ caseyburdick/Documents/Arduino/libraries/OSC" "-I/Users/caseyburdick/Downloads/ Arduino.app/Contents/Java/libraries/Ethernet/src" "-I/Users/caseyburdick/Downloads/ Arduino.app/Contents/Java/libraries/WiFi/src" "-I/Users/caseyburdick/Documents/ Arduino/libraries/DmxSimple" "-I/Users/caseyburdick/Downloads/Arduino.app/Contents/ Java/hardware/arduino/avr/libraries/SPI/src" "/var/folders/_7/ wv1b4xvd7fn2l0p68qkv6n_40000gn/T/builda038ad8fc2bba88c1618daa2f5490f4e.tmp/ sketch/WebServer_cb_progress.ino.cpp" -o "/var/folders/_7/ wv1b4xvd7fn2l0p68qkv6n_40000gn/T/builda038ad8fc2bba88c1618daa2f5490f4e.tmp/ sketch/WebServer_cb_progress.ino.cpp.o"
 WebServer_cb_progress:83: error: 'Serial' does not name a type
Serial.begin(9600);
^
 WebServer_cb_progress:84: error: expected unqualified-id before 'while'
while (!Serial) {
^

‘Serial’ is the name of an object. When it says ‘Serial’ doe not name a type it is absolutely correct. It would help to see your sketch but my guess is that you have one too many close-brackets in setup() and that is causing some of your setup code to be outside any function (where only variable declarations are allowed and those start with a type name).

eraticate:
sorry, error message failed to attach previously

So did the source code.