Message-ID: <8D53104ECD0CD211AF4000A0C9D60AE3359D65@probe-2.Acclaim-Euro.net> From: Shawn Hargreaves To: djgpp AT delorie DOT com Subject: Re: Allegro keypressed() always returning False Date: Thu, 17 Dec 1998 13:42:24 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1460.8) Content-Type: text/plain Reply-To: djgpp AT delorie DOT com 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.