byte does not name a type

Hi, I'm trying to compile the asteroids for arduino from the Hackvision website. Everytime I verify it, tells me byte does not name a type. The line in question states:

typedef struct Asteroid {
  byte x;
  byte y;
  byte info;  // high 4 bits are type, low 4 bits are heading

I think it should say unsinged bit byte x:
or some such, but I have tried and I only get the same errors. I feel this is a problem everyone has solved, but I just need some help!

Try:

typedef struct {
  byte x;
  byte y;
  byte info;  // high 4 bits are type, low 4 bits are heading
} Asteroid;

Asteroid myAsteriod;

j0z0r:
Hi, I'm trying to compile the asteroids for arduino from the Hackvision website. Everytime I verify it, tells me byte does not name a
I think it should say unsinged bit byte x:
or some such, but I have tried and I only get the same errors. I feel this is a problem everyone has solved, but I just need some help!

Link?

It may be missing an include for Arduino.h.

http://nootropicdesign.com/hackvision/games.html
I tried the first solution, same errors
When I added #include <Arduino.h> to the beginning, it just got hung up in a different error. There's something I'm doing wrong, I'm gonna try to do some more research and see what's up. I think it may be that these sketches were written with earlier versions of the IDE, or maybe earlier libraries

There's something I'm doing wrong,

Amen.

j0z0r:
When I added #include <Arduino.h> to the beginning, it just got hung up in a different error.

That "different error" is a secret, I gather.

I fell asleep with my laptop, lol. The error is in this line:

  tv.select_font(asteroids_font);

It says: Invalid conversion from 'const unsigned char*' to 'uint8_t'

Use #include "Arduino.h"
no between <>

surbyte:
Use #include "Arduino.h"
no between <>

I tried that just now, but it still gets hung up in the same spot. This is blowing my mind, I have seen plenty of people playing Asteroids on their Arduino, I just dunno how they got it to work. I'm trying to look for a newer version of the code with all the kinks already smoothed out, but I haven't had any luck yet

but it still gets hung up in the same spot

We've reached reply #9 and we still haven't seen your code.

I wish you good luck.

I linked it, because it has a lot of "includes." Here's a copy of the file, since it wouldn't let me paste the code directly

Asteroids.pde (38.8 KB)

I compiled your code using Arduino IDE v1.5.4 and works fine.
Check your vertion.

code and libraries

Although we're shooting in the dark because we haven't seen the full code, the comment:

tv.select_font(asteroids_font);
It says: Invalid conversion from 'const unsigned char*' to 'uint8_t'

might mean that the function doesn't want the entire structure, but just one member, such as:

 tv.select_font(asteroids_font.info);

surbyte:
I compiled your code using Arduino IDE v1.5.4 and works fine.
Check your vertion.

code and libraries

Ok, I installed the latest Beta from the Arduino website, and that seems to take care of most of the errors I was describing. Now when I go to compile, it says:
Arduino: 1.5.8 (Windows 8), Board: "Arduino Nano, ATmega328"

Build options changed, rebuilding all

Using library TVout in folder: C:\Users\Joseph\Documents\Arduino\libraries\TVout (legacy)

Using library EEPROM in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM

Using library Controllers in folder: C:\Users\Joseph\Documents\Arduino\libraries\Controllers (legacy)

C:\Program Files (x86)\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs -IC:\Users\Joseph\Documents\Arduino\libraries\TVout -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM -IC:\Users\Joseph\Documents\Arduino\libraries\Controllers C:\Users\Joseph\AppData\Local\Temp\build3589164574206135454.tmp\sketch_oct18a.cpp -o C:\Users\Joseph\AppData\Local\Temp\build3589164574206135454.tmp\sketch_oct18a.cpp.o

sketch_oct18a.ino:15:23: fatal error: Asteroids.h: No such file or directory
compilation terminated.
Error compiling.

I know the Asteroids.h file is in the proper directory, so the problem must be something else. I'm going to try rebuilding my directories and libraries and see if that helps. I'm thinking maybe it doesn't know where to look after the new install