Python Forum
Problem with my pong game code
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with my pong game code
#4
(Sep-09-2021, 11:34 AM)Than999 Wrote:
(Aug-28-2021, 04:41 PM)ndc85430 Wrote: Line 46: drop the parens on paddle_a_up. Why? Because having the parens means calling the function and then the return value is passed to onkeypress, which isn't what you want to do. Instead, you want to pass the function itself to onkeypress, so that it can be called when the relevant key is pressed.

Okay, thanks for your suggestion!

I am having a similar issue and since i am a bit new to coding i dont properly understand what you are saying
Reply


Messages In This Thread
Problem with my pong game code - by Than999 - Aug-28-2021, 04:12 PM
RE: Problem with my pong game code - by ndc85430 - Aug-28-2021, 04:41 PM
RE: Problem with my pong game code - by Than999 - Sep-09-2021, 11:34 AM
RE: Problem with my pong game code - by kinggemini696 - May-14-2022, 02:47 PM
RE: Problem with my pong game code - by ndc85430 - May-14-2022, 03:08 PM
RE: Problem with my pong game code - by ndc85430 - May-15-2022, 04:43 AM
RE: Problem with my pong game code - by deanhystad - May-15-2022, 06:40 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  needing some help to write some code for a game calculator rymdaksel 1 581 Jan-02-2024, 09:56 AM
Last Post: deanhystad
  How to send a pong on websocket-client tomtom 0 4,033 Aug-15-2022, 05:58 AM
Last Post: tomtom
  Stacking Problem in a game. HelloTobi22 2 1,108 Aug-05-2022, 09:48 AM
Last Post: HelloTobi22
  Problem restricting user input in my rock paper scissors game ashergreen 6 4,879 Mar-25-2021, 03:54 AM
Last Post: deanhystad
  Pong game buss0140 7 4,342 Dec-27-2020, 07:04 AM
Last Post: ndc85430
  Music Selection Game Code WyattH 3 2,591 Jul-20-2020, 11:16 AM
Last Post: ndc85430
  Guessing game problem IcodeUser8 7 3,891 Jul-19-2020, 07:37 PM
Last Post: IcodeUser8
  Beginner Code, how to print something after a number of turns (guessing game) QTPi 4 2,964 Jun-18-2020, 04:59 PM
Last Post: QTPi
  Python Hangman Game - Multiple Letters Problem t0rn 4 4,935 Jun-05-2020, 11:27 AM
Last Post: t0rn
  game of the goose - dice problem koop 4 3,639 Apr-11-2020, 02:48 PM
Last Post: ibreeden

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020