Path: chuka.playstation.co.uk!news From: daniel@reichardt.ch (Daniel Hartmeier) Newsgroups: scee.yaroze.beginners Subject: Re: -***Please, Please help me. *** Date: Tue, 18 May 1999 17:05:30 GMT Organization: Reichardt Informatik AG Lines: 43 Message-ID: <37429b07.1888335@news.playstation.co.uk> References: <7hp9cb$llu8@chuka.playstation.co.uk> NNTP-Posting-Host: dial-in-97.magnet.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Newsreader: Forte Agent 1.5/32.451 On Mon, 17 May 1999 15:32:28 +0100, Laurence Dyer wrote: > It is some code that i'm trying to get to work. Whenever i try to compile it > in gcc, it comes up with a few error messages, does anyone know what's wrong > with it? I had to make two small adjustments in your source: > void initpads(void) { GetPadBuf(&bb[0], &bb[1]); } ^ The function prototype and calls have an upper-case 'P'. Might cause an error from a case-sensitive linker. > int padState(int port) { return ~(*(bb[port]+3) || * (bb[port]+2) <<8); } ^^ > > int updateGame(void) { > if (padConnected(0) == PADin) { > if ((padType(0) == PADstandard) || > (padType(0) == PADanalogue) || ^^ Instead of the logical OR operator '||' (I assume that's what is meant here) the source file contained invalid characters. Might have been scrambled through transmission, though. Otherwise your code compiles and links without errors or warnings in my environment. The executable does, as far as I can tell, display a timer in the upper left corner (counting seconds) and doesn't crash. So, what compiler or linker error messages do you get exactly? Are they related to your source code only, or is there a problem with your header files? Is your environment configured correctly and compiles and links other programs successfully? Regards, -- Daniel Hartmeier PGP 6A3A7409 ICQ# 12742482 "The woods are lovely, dark and deep. But I have promises to keep, And lines to code before I sleep, And lines to code before I sleep."