Mail Archives: djgpp/1998/12/17/08:45:29
Graeme Fenwick writes:
> I'm having problems with Allegro's keypressed() function. It seems
> to be returning false, regardless of what the user types in.
Nope, you just aren't checking the value properly...
> if (!keypressed());
> return NO_KEY; /******** PROBLEM HERE!! *** buffer empty?
Get rid of the semicolon from the end of your if statement. With that
in place, you have two totally different lines, so the return will
always be executed regardless of the keypressed() status.
Shawn Hargreaves.
- Raw text -