Error not declare in this scope

Hello everybody,
I allow myself to contact you because I need help on an error when I compile.
I am trying to modify a program of a 3D printer.
When I choose the ultimaker 2.0 card this message does not appear.
As soon as I choose arduino mega 2560 the following message appears:

sketch\ConfigurationStore.cpp: In function 'void Config_StoreSettings()':

 

ConfigurationStore.cpp:81: error: 'motor_current_setting' was not declared in this scope

 

   EEPROM_WRITE_VAR(i,motor_current_setting);

 

                      ^

 

sketch\ConfigurationStore.cpp:17:72: note: in definition of macro 'EEPROM_WRITE_VAR'

 

#define EEPROM_WRITE_VAR(pos, value) _EEPROM_writeData(pos, (uint8_t*)&value, sizeof(value))

 

                                                                        ^

 

sketch\ConfigurationStore.cpp: In function 'void Config_RetrieveSettings()':

 

ConfigurationStore.cpp:212: error: 'motor_current_setting' was not declared in this scope

 

         EEPROM_READ_VAR(i,motor_current_setting);

 

                           ^

 

sketch\ConfigurationStore.cpp:27:70: note: in definition of macro 'EEPROM_READ_VAR'

 

#define EEPROM_READ_VAR(pos, value) _EEPROM_readData(pos, (uint8_t*)&value, sizeof(value))

 

                                                                      ^

 

sketch\ConfigurationStore.cpp: In function 'void Config_ResetDefault()':

 

ConfigurationStore.cpp:287: error: 'motor_current_setting' was not declared in this scope

 

     motor_current_setting[0] = tmp_motor_current_setting[0];

 

     ^

 

exit status 1

'motor_current_setting' was not declared in this scope

If you need any other information do not hesitate to leave me a message
I manage to make small mistakes but I get stuck.
I would tend to delete all messages with the message: Is not registered in the scope. What do you think?
Thank you in advance for your help.

Hello everybody,
I allow myself to contact you because I need help on an error when I compile.
I am trying to modify a program of a 3D printer.
As soon as I choose arduino mega 2560 the following message appears:

sketch\ConfigurationStore.cpp: In function 'void Config_StoreSettings()':

 

ConfigurationStore.cpp:81: error: 'motor_current_setting' was not declared in this scope

 

   EEPROM_WRITE_VAR(i,motor_current_setting);

 

                      ^

 

sketch\ConfigurationStore.cpp:17:72: note: in definition of macro 'EEPROM_WRITE_VAR'

 

#define EEPROM_WRITE_VAR(pos, value) _EEPROM_writeData(pos, (uint8_t*)&value, sizeof(value))

 

                                                                        ^

 

sketch\ConfigurationStore.cpp: In function 'void Config_RetrieveSettings()':

 

ConfigurationStore.cpp:212: error: 'motor_current_setting' was not declared in this scope

 

         EEPROM_READ_VAR(i,motor_current_setting);

 

                           ^

 

sketch\ConfigurationStore.cpp:27:70: note: in definition of macro 'EEPROM_READ_VAR'

 

#define EEPROM_READ_VAR(pos, value) _EEPROM_readData(pos, (uint8_t*)&value, sizeof(value))

 

                                                                      ^

 

sketch\ConfigurationStore.cpp: In function 'void Config_ResetDefault()':

 

ConfigurationStore.cpp:287: error: 'motor_current_setting' was not declared in this scope

 

     motor_current_setting[0] = tmp_motor_current_setting[0];

 

     ^

 

exit status 1

'motor_current_setting' was not declared in this scope

If you need any other information do not hesitate to leave me a message
I manage to make small mistakes but I get stuck.
I would tend to delete all messages with the message: Is not registered in the scope. What do you think?
Thank you in advance for your help.

As soon as I choose arduino mega 2560

I wonder if that might be a clue.

I wonder if this is the wrong section for your question.

Hi,
Sorry but i don't understand why you say that...

I use at mega 2560 with ramp 1.4 and stepper drive.

Please van you explain to me

Have you tried reading the Useful Link post at the top of the Forum? It has a section on Scope.

You've posted an error message, but not the code that generates it.
You've posted your question in the wrong section.
See the problem?

Cross-post reported.

Ok sorry

Threads merged.

What is the Threads merged?

You started two threads on the same subject. I merged the two threads together.