Hello sorry I keep asking about errors but I am new.
I am making a ping pong game, an arduino with a proto-shield and an LCD.
I wrote a 700 line program, so no suprise there is an error.
There used to be three errors, now there is about 100.
Here is the 1/2 the code:
;lcd.print("Press go 2 play")
;val = digitalRead(inPin);
;if (val == LOW)
;lcd.print("start in 3")
;delay(1000)
;lcd.clear()
;lcd.print("start in 2")
;delay(1000)
;lcd.clear()
;lcd.print("start in 1")
;delay(1000)
;lcd.clear()
;lcd.print("GO!")
;delay(1000)
;lcd.clear()
;lcd.write(2)
;lcd.print(" ")
;lcd.write(5)
;lcd.print(" ")
;lcd.write(2)
;lcd.setCursor(7, 0)
;lcd.write(3)
;delay(100)
;val = digitalRead(0);
;if (val == LOW)
x = x+1
;else
{
break;
}
//I WAS HERE
;lcd.setCursor(6, 0)
;lcd.write(3)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;lcd.setCursor(5, 1)
;lcd.write(0)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;lcd.setCursor(4, 1)
;lcd.write(1)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;lcd.setCursor(3, 1)
;lcd.write(2)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;lcd.setCursor(2, 1)
;lcd.write(3)
;delay(100)
;if (x > 4)
{
goto arduino;
}
;else
{
goto gameover;
}
//after the first bounce, here is arduinos turn!!!
arduino;
;lcd.setCursor(3, 1)
;lcd.write(3)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;lcd.setCursor(4, 1)
;lcd.write(2)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;lcd.setCursor(5, 1)
;lcd.write(1)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;lcd.setCursor(6, 1)
;lcd.write(0)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;lcd.setCursor(7, 0)
;lcd.write(3)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;lcd.setCursor(8, 0)
;lcd.write(2)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;lcd.setCursor(9, 0)
;lcd.write(1)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;lcd.setCursor(10, 0)
;lcd.write(0)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;lcd.setCursor(11, 0)
;lcd.write(1)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;lcd.setCursor(12, 0)
;lcd.write(2)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;lcd.setCursor(13, 0)
;lcd.write(3)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;lcd.setCursor(14, 1)
;lcd.write(0)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;lcd.setCursor(15, 1)
;lcd.write(1)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;lcd.setCursor(16, 1)
;lcd.write(2)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
//arduino just got hit by the ball
;lcd.setCursor(15, 1)
;lcd.write(2)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;lcd.setCursor(14, 1)
;lcd.write(1)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;lcd.setCursor(13, 1)
;lcd.write(1)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;lcd.setCursor(13, 1)
;lcd.write(1)
;delay(100)
;if (pushButton == HIGH) {
x = x+1
}
;}
gameover;
lcd.print(" GAME OVER! ")
delay(10000)
That is the end of it...