Code error, mega 2560

Code:

void loop() {
ledsOff();
digitalWrite(3,HIGH);
delay(1000);
ledsOff();
digitalWrite(5,HIGH);
delay(1000);
ledsOff();
digitalWrite(6,HIGH);
delay(1000);
ledsOff();
digitalWrite(7,HIGH);
delay(1000);
ledsOff();
digitalWrite(8,HIGH);
delay(1000);
ledsOff();
digitalWrite(9,HIGH);
delay(1000);
ledsOff();
digitalWrite(11,HIGH);
delay(1000);
ledsOff();
digitalWrite(13,HIGH);
delay(1000);
}
Error:
function 'void loop()': sketch_nov20a.ino:2:13: error: 'ledsOff' was not declared in this scope

the error is most likely in the lines ledsOff();

Your topic was MOVED to its current forum category which is more appropriate than the original as it is not an Introductory Tutorial

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use [color = red]code tags[/color] (the </> icon above the compose window) to make it easier to read and copy for examination

Please post your complete sketch, not just part of it

which is a call to a function which i do not see anywhere, nor do i see setup(), please post the complete code

here is the full code

void loop() {
ledsOff();
digitalWrite(3,HIGH);
delay(1000);
ledsOff();
digitalWrite(5,HIGH);
delay(1000);
ledsOff();
digitalWrite(6,HIGH);
delay(1000);
ledsOff();
digitalWrite(7,HIGH);
delay(1000);
ledsOff();
digitalWrite(8,HIGH);
delay(1000);
ledsOff();
digitalWrite(9,HIGH);
delay(1000);
ledsOff();
digitalWrite(11,HIGH);
delay(1000);
ledsOff();
digitalWrite(13,HIGH);
delay(1000);
}

I do everything by the book 77 arduino projects but there was no setup(); command.

not only is "setup()" missing, but "ledsOff()" as well

not quite by the book

I redid the code but the same error

void setup(){
pinMode(3,OUTPUT);
pinMode(5,OUTPUT);
pinMode(6,OUTPUT);
pinMode(7,OUTPUT);
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
pinMode(11,OUTPUT);
pinMode(13,OUTPUT);
}
void loop() {
ledsOff();
digitalWrite(3,HIGH);
delay(1000);
ledsOff();
digitalWrite(5,HIGH);
delay(1000);
ledsOff();
digitalWrite(6,HIGH);
delay(1000);
ledsOff();
digitalWrite(7,HIGH);
delay(1000);
ledsOff();
digitalWrite(8,HIGH);
delay(1000);
ledsOff();
digitalWrite(9,HIGH);
delay(1000);
ledsOff();
digitalWrite(11,HIGH);
delay(1000);
ledsOff();
digitalWrite(13,HIGH);
delay(1000);
}

still missing ledsOff()

do you understanding that "ledsOff()" is not some standard Arduino library function.

not sure why you need it. it looks like your code is simply turning on each LED in sequence every 1 sec.

try removing the lines with ledsOff() and see if program compiles and does what you expect

thank you very much, I'm a beginner and for me flashing LEDs is something incredible

This does not mean that you can violate the rules of the forum. You posted code without tags three times

You must to read this before you proceed:-

how to get the best out of this forum