Hello everyone,
I have a coding problem and hope you can help me with it.
I copied part of the code from the Internet and programmed the rest myself. Everything worked out in the beginning and the program worked extremely well. It was only when I programmed a few lines of code to choose game mode that it started showing me error messages.
As I said, everything worked before that.
thank u very much!
here is the error message:
Arduino: 1.8.11 (Windows Store 1.8.29.0) (Windows 10), Board: "Arduino Uno"
mario:312:36: error: stray '\302' in program
digitalWrite(LED_GREEN, HIGH); ´
^
mario:312:37: error: stray '\264' in program
digitalWrite(LED_GREEN, HIGH); ´
^
mario:650:35: error: stray '\302' in program
digitalWrite(BUZZER1, LOW); ´
^
mario:650:36: error: stray '\264' in program
digitalWrite(BUZZER1, LOW); ´
^
mario:113:31: error: 'NOTE_E3' was not declared in this scope
NOTE_C4, NOTE_FS4, NOTE_F4, NOTE_E3, NOTE_AS4, NOTE_A4,
^~~~~~~
C:\Users\rasla\OneDrive\Documents\Arduino\mario\mario.ino:113:31: note: suggested alternative: 'NOTE_E4'
NOTE_C4, NOTE_FS4, NOTE_F4, NOTE_E3, NOTE_AS4, NOTE_A4,
^~~~~~~
NOTE_E4
C:\Users\rasla\OneDrive\Documents\Arduino\mario\mario.ino: In function 'void setup()':
mario:148:5: error: 'hallo' was not declared in this scope
hallo();
^~~~~
C:\Users\rasla\OneDrive\Documents\Arduino\mario\mario.ino:148:5: note: suggested alternative: 'malloc'
hallo();
^~~~~
malloc
mario:150:5: error: 'gameMode' was not declared in this scope
gameMode = MODE_MEMORY; // By default, we're going to play the memory game
^~~~~~~~
C:\Users\rasla\OneDrive\Documents\Arduino\mario\mario.ino:150:5: note: suggested alternative: 'gameRound'
gameMode = MODE_MEMORY; // By default, we're going to play the memory game
^~~~~~~~
gameRound
mario:179:5: error: 'updateMenu1' was not declared in this scope
updateMenu1();
^~~~~~~~~~~
mario:180:5: error: 'loopi1' was not declared in this scope
loopi1();
^~~~~~
C:\Users\rasla\OneDrive\Documents\Arduino\mario\mario.ino:180:5: note: suggested alternative: 'loop'
loopi1();
^~~~~~
loop
mario:190:5: error: 'updateMenu' was not declared in this scope
updateMenu();
^~~~~~~~~~
mario:191:5: error: 'loopi' was not declared in this scope
loopi();
^~~~~
C:\Users\rasla\OneDrive\Documents\Arduino\mario\mario.ino:191:5: note: suggested alternative: 'loop'
loopi();
^~~~~
loop
C:\Users\rasla\OneDrive\Documents\Arduino\mario\mario.ino: In function 'void loop()':
mario:199:5: error: 'attractMode' was not declared in this scope
attractMode();
^~~~~~~~~~~
mario:212:11: error: 'play_memory' was not declared in this scope
if (play_memory() == true) {
^~~~~~~~~~~
C:\Users\rasla\OneDrive\Documents\Arduino\mario\mario.ino:212:11: note: suggested alternative: 'play_loser'
if (play_memory() == true) {
^~~~~~~~~~~
play_loser
mario:228:7: error: 'play_battle' was not declared in this scope
play_battle(); // Play game until someone loses
^~~~~~~~~~~
C:\Users\rasla\OneDrive\Documents\Arduino\mario\mario.ino: In function 'void toner(byte, int)':
mario:361:24: error: a function-definition is not allowed here before '{' token
void playMoves(void) {
^
mario:370:29: error: a function-definition is not allowed here before '{' token
boolean play_memory(void) {
^
mario:389:26: error: a function-definition is not allowed here before '{' token
byte checkButton(void) {
^
mario:398:16: error: a function-definition is not allowed here before '{' token
void loopi() {
^
mario:420:21: error: a function-definition is not allowed here before '{' token
void updateMenu() {
^
mario:448:24: error: a function-definition is not allowed here before '{' token
void executeAction() {
^
mario:462:18: error: a function-definition is not allowed here before '{' token
void action1() {
^
mario:466:18: error: a function-definition is not allowed here before '{' token
void action2() {
^
mario:470:18: error: a function-definition is not allowed here before '{' token
void action3() {
^
mario:476:17: error: a function-definition is not allowed here before '{' token
void loopi1() {
^
mario:498:22: error: a function-definition is not allowed here before '{' token
void updateMenu1() {
^
mario:521:25: error: a function-definition is not allowed here before '{' token
void executeAction1() {
^
mario:533:19: error: a function-definition is not allowed here before '{' token
void action11() {
^
mario:539:19: error: a function-definition is not allowed here before '{' token
void action22() {
^
mario:546:16: error: a function-definition is not allowed here before '{' token
void hallo() {
^
mario:553:26: error: a function-definition is not allowed here before '{' token
void attractMode(void) {
^
mario:585:29: error: a function-definition is not allowed here before '{' token
boolean play_battle(void) {
^
mario:607:30: error: a function-definition is not allowed here before '{' token
byte wait_for_button(void) {
^
exit status 1
stray '\302' in program
Dieser Bericht wäre detaillierter, wenn die Option
"Ausführliche Ausgabe während der Kompilierung"
in Datei -> Voreinstellungen aktiviert wäre.