Re: [Tutor] invalid literal for int error in Game loop

2013-01-05 Thread Ciaran Mooney
On 4 Jan 2013, at 19:20, Francesco Loffredo wrote: > Ciaran Mooney wrote: >> Thanks for the feedback. >> >> Steve, If I set the FPS to a default of say 30, the game seems to run at >> this default FPS=30 regardless of the key pressed in the function. >> >> Dave, If I remove the the default v

Re: [Tutor] invalid literal for int error in Game loop

2013-01-04 Thread Francesco Loffredo
Ciaran Mooney wrote: Thanks for the feedback. Steve, If I set the FPS to a default of say 30, the game seems to run at this default FPS=30 regardless of the key pressed in the function. Dave, If I remove the the default value at the start of the function and add it to elif in the loop I get

Re: [Tutor] invalid literal for int error in Game loop

2012-12-20 Thread Prasad, Ramit
Ciaran Mooney wrote: > Sent: Thursday, December 20, 2012 3:35 PM > To: d...@davea.name > Cc: tutor@python.org > Subject: Re: [Tutor] invalid literal for int error in Game loop > > Thanks for the feedback. > > Steve, If I set the FPS to a default of say 30, the g

Re: [Tutor] invalid literal for int error in Game loop

2012-12-20 Thread Dave Angel
On 12/20/2012 04:34 PM, Ciaran Mooney wrote: > Thanks for the feedback. > > Steve, If I set the FPS to a default of say 30, the game seems to run at this > default FPS=30 regardless of the key pressed in the function. > > Dave, If I remove the the default value at the start of the function and a

Re: [Tutor] invalid literal for int error in Game loop

2012-12-20 Thread Ciaran Mooney
Thanks for the feedback. Steve, If I set the FPS to a default of say 30, the game seems to run at this default FPS=30 regardless of the key pressed in the function. Dave, If I remove the the default value at the start of the function and add it to elif in the loop I get the following error: T

Re: [Tutor] invalid literal for int error in Game loop

2012-12-20 Thread Dave Angel
On 12/20/2012 03:51 PM, Steven D'Aprano wrote: > On 21/12/12 07:40, Ciaran Mooney wrote: > >> def difficultyLevel(): >> FPS = '' > > Here you set the variable FPS to the empty string. > >> if event.type == KEYDOWN: >> if event.key == ord('b'): >> FPS = 30

Re: [Tutor] invalid literal for int error in Game loop

2012-12-20 Thread Steven D'Aprano
On 21/12/12 07:40, Ciaran Mooney wrote: def difficultyLevel(): FPS = '' Here you set the variable FPS to the empty string. if event.type == KEYDOWN: if event.key == ord('b'): FPS = 30 elif event.key == ord('m'): FPS =