I keep getting the error message below when I attempt to upload this Sketch.
This is the code. The red lines do not show in the code it is WORD trying to correct the Grammer
AUTOMATION(1,"MainStation_Loop")
SETLOCO(3801)
FON(3)
FWD(50)
CLOSE(14)
AT(4)
FWD(10)
AT(5)
STOP
DELAYRANDOM(5000, 10000)
FWD(50)
CLOSE(22)
THROW(10)
CLOSE(8)
DELAY(20000)
STOP
DONE
This is the error message from the Arduino.
C:\Users\Victor\Comand Station\CommandStation-EX\myAutomation_MainStation_Loop.ino:2:11: error: expected constructor, destructor, or type conversion before '(' token
AUTOMATION(1,"MainStation_Loop")
^
exit status 1
Compilation error: expected constructor, destructor, or type conversion before '(' token
That's not any kind of sketch I recognize from the Arduino world. And it doesn't appear to be any kind of sketch that whatever IDE you're using recognizes either. It appears to be some sort of script to be interpreted by something, not a sketch to be compiled and uploaded to an Arduino.
Hi
It is code from Dcc-EX model railway and should upload into my arduino mega. I have loaded similar code previously but it know refuses to do it. I have not knowingly changed anything. Google “dcc exrail” for info on the process
Regards
Goody
That isn't an Arduino sketch. Not for an Uno, not for a Mega, not for a Pro Micro. It might be something that the DCC-EX sketch understands... but it's not an Arduino sketch. And it won't upload through the IDE.