Path: chuka.playstation.co.uk!news From: sosman@terratron.com (Steven Osman) Newsgroups: scee.yaroze.beginners Subject: Re: -*** Please, Please help me again !!! ***- Date: Thu, 20 May 1999 17:30:43 GMT Organization: PlayStation Net Yaroze (SCEE) Lines: 41 Message-ID: <37444667.836628718@news.playstation.co.uk> References: <7i197u$1182@chuka.playstation.co.uk> NNTP-Posting-Host: 209.27.57.69 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Newsreader: Forte Agent 1.5/32.452 Michael, I'm not sure, but it looks like you are using a logical or where you wanted to make a bitwise or int padState(int port) { return ~(*(bb[port]+3) || * (bb[port]+2) <<8); } Should probably read int padState(int port) { return ~(*(bb[port]+3) | * (bb[port]+2) <<8); } (note the | instead of ||) See if that helps. Steven On Thu, 20 May 1999 16:18:24 +0100, "Michael Dyer" wrote: >thanks a lot for your help last time, Daniel and Dennis, the problem was the >Inavlid characters instead of ||. > >Now i've got some more trouble with the same code (the code can be found >attachede to this file). The program is programmed to terminate when the >user presses the buttons START + SELECT, using the updateGame(); function. >When i run the program, it start and then stops straight away, unless i >comment out the line: > >done = updateGame(); > >I think that theprogram is being told that the user is pressing the start + >select buttons, even if they're not. > >Please help me. > >Loz >