small medium large xlarge

Back to: All Forums  Arduino
Generic-user-small
12 Mar 2015, 21:36
Tom Krenz (3 posts)

Hey guys,

if i use the uploaded code there are same problems i listed below.I used Arduino Ide 1.05.

This occurs when i press the check button:

Game:14: error: ‘final’ was not declared in this scope Game:14: error: ‘final’ was not declared in this scope Game:14: error: initializer expression list treated as compound expression Game:15: error: ‘final’ was not declared in this scope Game:15: error: ‘final’ was not declared in this scope Game:15: error: initializer expression list treated as compound expression Game:19: error: variable or field ‘serialEvent’ declared void Game:19: error: expected )' before 'port' Game:1: error: 'import' does not name a type Game:2: error: 'Serial' does not name a type Game:4: error: expected constructor, destructor, or type conversion before 'int' Game:5: error: expected constructor, destructor, or type conversion before 'int' Game:6: error: expected constructor, destructor, or type conversion before 'int' Game:7: error: expected constructor, destructor, or type conversion before 'int' Game:8: error: expected constructor, destructor, or type conversion before 'int' Game:9: error: expected constructor, destructor, or type conversion before 'int' Game:10: error: expected constructor, destructor, or type conversion before 'int' Game:11: error: expected constructor, destructor, or type conversion before 'int' Game:12: error: expected constructor, destructor, or type conversion before 'int' Game:13: error: expected constructor, destructor, or type conversion before 'int' Game:14: error: expected constructor, destructor, or type conversion before 'int' Game:15: error: expected constructor, destructor, or type conversion before 'int' Game:16: error: expected constructor, destructor, or type conversion before 'int' Game:17: error: expected constructor, destructor, or type conversion before 'int' Game:18: error: expected constructor, destructor, or type conversion before 'int' Game:19: error: expected constructor, destructor, or type conversion before 'int' Game:23: error: 'WIDTH' was not declared in this scope Game:24: error: expected unqualified-id before '[' token Game.pde: In function 'void setup()': Game:31: error: 'WIDTH' was not declared in this scope Game:31: error: 'HEIGHT' was not declared in this scope Game:31: error: 'size' was not declared in this scope Game:32: error: 'noCursor' was not declared in this scope Game:33: error: 'loadFont' was not declared in this scope Game:33: error: 'textFont' was not declared in this scope Game:35: error: 'class HardwareSerial' has no member named 'list' Game:35: error: 'println' was not declared in this scope Game:36: error: 'arduinoPort' was not declared in this scope Game:36: error: expected type-specifier before 'Serial' Game:36: error: expected ;’ before ‘Serial’ Game:37: error: ‘LINE_FEED’ was not declared in this scope Game.pde: In function ‘void initBricks()’: Game:46: error: ‘COLUMNS’ was not declared in this scope Game:47: error: ‘ROWS’ was not declared in this scope Game:48: error: ‘bricks’ was not declared in this scope Game.pde: In function ‘void initBall()’: Game:52: error: ‘width’ was not declared in this scope Game:53: error: ‘height’ was not declared in this scope Game:54: error: ‘MAX_VELOCITY’ was not declared in this scope Game.pde: In function ‘void draw()’: Game:59: error: ‘background’ was not declared in this scope Game:60: error: ‘stroke’ was not declared in this scope Game:61: error: ‘strokeWeight’ was not declared in this scope Game.pde: In function ‘boolean drawBricks()’: Game:80: error: ‘COLUMNS’ was not declared in this scope Game:81: error: ‘ROWS’ was not declared in this scope Game:82: error: ‘bricks’ was not declared in this scope Game:84: error: ‘fill’ was not declared in this scope Game:86: error: ‘MARGIN’ was not declared in this scope Game:86: error: ‘BRICK_WIDTH’ was not declared in this scope Game:87: error: ‘BRICK_HEIGHT’ was not declared in this scope Game:90: error: ‘rect’ was not declared in this scope Game.pde: In function ‘void drawBall()’: Game:98: error: ‘strokeWeight’ was not declared in this scope Game:99: error: ‘fill’ was not declared in this scope Game:100: error: ‘BALL_DIAMETER’ was not declared in this scope Game:100: error: ‘ellipse’ was not declared in this scope Game.pde: In function ‘void drawPaddle()’: Game:104: error: ‘PADDLE_WIDTH’ was not declared in this scope Game:105: error: ‘height’ was not declared in this scope Game:105: error: ‘PADDLE_HEIGHT’ was not declared in this scope Game:105: error: ‘MARGIN’ was not declared in this scope Game:106: error: ‘strokeWeight’ was not declared in this scope Game:107: error: ‘fill’ was not declared in this scope Game:108: error: ‘rect’ was not declared in this scope Game.pde: In function ‘void printWinMessage()’: Game:112: error: ‘fill’ was not declared in this scope Game:113: error: ‘textSize’ was not declared in this scope Game:114: error: ‘CENTER’ was not declared in this scope Game:114: error: ‘textAlign’ was not declared in this scope Game:115: error: ‘width’ was not declared in this scope Game:115: error: ‘height’ was not declared in this scope Game:115: error: ‘text’ was not declared in this scope Game.pde: In function ‘void printPauseMessage()’: Game:119: error: ‘fill’ was not declared in this scope Game:120: error: ‘textSize’ was not declared in this scope Game:121: error: ‘CENTER’ was not declared in this scope Game:121: error: ‘textAlign’ was not declared in this scope Game:122: error: ‘width’ was not declared in this scope Game:122: error: ‘height’ was not declared in this scope Game:122: error: ‘text’ was not declared in this scope Game.pde: In function ‘boolean ballDropped()’: Game:139: error: ‘height’ was not declared in this scope Game:139: error: ‘BALL_RADIUS’ was not declared in this scope Game.pde: At global scope: Game:142: error: redefinition of ‘boolean inXRange’ Game:14: error: ‘boolean inXRange’ previously defined here Game:142: error: ‘final’ was not declared in this scope Game:142: error: ‘final’ was not declared in this scope Game:147: error: redefinition of ‘boolean inYRange’ Game:15: error: ‘boolean inYRange’ previously defined here Game:147: error: ‘final’ was not declared in this scope Game:147: error: ‘final’ was not declared in this scope Game.pde: In function ‘void checkBrickCollision()’: Game:153: error: ‘COLUMNS’ was not declared in this scope Game:154: error: ‘ROWS’ was not declared in this scope Game:155: error: ‘bricks’ was not declared in this scope Game:156: error: ‘inXRange’ cannot be used as a function Game:156: error: ‘inYRange’ cannot be used as a function Game:158: error: ‘inXRange’ cannot be used as a function Game:160: error: ‘inYRange’ cannot be used as a function Game.pde: In function ‘void checkWallCollision()’: Game:169: error: ‘BALL_RADIUS’ was not declared in this scope Game:169: error: ‘width’ was not declared in this scope Game:172: error: ‘BALL_RADIUS’ was not declared in this scope Game:172: error: ‘height’ was not declared in this scope Game.pde: In function ‘void checkPaddleCollision()’: Game:177: error: ‘final’ was not declared in this scope Game:177: error: expected ;' before 'int' Game:178: error: 'height' was not declared in this scope Game:178: error: 'PADDLE_HEIGHT' was not declared in this scope Game:178: error: 'MARGIN' was not declared in this scope Game:179: error: 'cx' was not declared in this scope Game:179: error: 'PADDLE_WIDTH' was not declared in this scope Game:187: error: 'MAX_VELOCITY' was not declared in this scope Game.pde: At global scope: Game:194: error: variable or field 'serialEvent' declared void Game:194: error: expected )’ before ‘port’

Could i even upload it?

Generic-user-small
12 Mar 2015, 21:37
Tom Krenz (3 posts)

And how to start the game ?

Maik_schmidt_avatar2_pragsmall
13 Mar 2015, 09:50
Maik Schmidt (122 posts)

Hi Tom!

As far as I can see you tried to compile the game’s code using the Arduino IDE. The game was written in a programming language named Processing (https://processing.org/). You have to download Processing and run the Game in the Processing IDE. It is very similar to the Arduino IDE. In addition, you have to upload the game controller code to the Arduino.

Best, Maik

Generic-user-small
14 Mar 2015, 11:26
Tom Krenz (3 posts)

Wau. Thank you for the quick reply. :)))

You must be logged in to comment