Hi Guys
I wonder if one of you would help me with my code .. .. ..
This is still my Grandkids Christmas present .. ..
I've have this code working in another version, but I've tried to alter it so that the wave files play coincident with an LED on, rather than a button push.
I'm getting error codes for curly braces problems but I can't find any .. .. however, I'm very much a novice and probably missing something obvious.
Code is appended .. .. error codes are here .. ...
Arduino: 1.6.5 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"
Button_Hero_6a.ino: In function 'void loop()':
Button_Hero_6a:100: error: expected '}' before 'else'
Button_Hero_6a:100: error: expected '}' before 'else'
Button_Hero_6a:104: error: 'else' without a previous 'if'
Button_Hero_6a:108: error: 'else' without a previous 'if'
Button_Hero_6a:112: error: 'else' without a previous 'if'
Button_Hero_6a.ino: At global scope:
Button_Hero_6a:318: error: 'lostHealth' does not name a type
Button_Hero_6a:319: error: expected declaration before '}' token
expected '}' before 'else'
I think line 100 to 112 are the problem; I think 318 & 319 will go away when this is right.
Thanks for your time .. ...
S
Button_Hero_6a.ino (8.73 KB)