Help with My Pong Game Code on Pixel Pad

0
3
Asked By CuriousCat92 On

Hey everyone! I'm currently taking a programming class and have been struggling to get my Pong game code to work on Pixel Pad. Since it's not the most popular platform, I can't find much guidance online. I would really appreciate it if someone could help me troubleshoot the issues or provide tips on fixing my messy code. Here's the breakdown: Pixel Pad has two sections—'code' and 'loop'.

Here's a snippet of my code:

```
room_set("play")
Game.player1score=0
Game.player2score=0
#Paddle1 start
self.sprite=new_sprite("paddle1.png")
self.x=-600
self.scaleX=1.0
self.scaleY=4.5
self.speed=13
...
```
I know it's a bit chaotic, but any insights on errors or how to improve this would be awesome!

1 Answer

Answered By CodeNinja45 On

Can you clarify what you mean by 'it isn't working'? What errors are you actually encountering? That would help us diagnose the issue better. Also, your code needs better formatting; it’s tough to read as is. Do you have a grasp on what each part does, or did an AI help you with this?

CuriousCat92 -

Thanks for the response! The problem is that it doesn't run at all—Pixel Pad throws an error that says 'bad input in Paddle.loop() on line 8.' I’m not familiar with how to format the code properly yet. I did get help from some AI for certain parts, but most of it is my own work with a classmate. I wish I could share screenshots for clarity, but I can't for some reason.

TechieTom -

There are a lot of syntax issues in your code that will cause it to break. For example, you're missing some quotes and have missed parentheses in various places. Also, check that you're not repeating the paddle loop sections and ensure that your variable assignments are properly formatted like 'modoJuego = 1' instead of just 'modoJuego =1'. It gets messy and that's likely causing some of the errors.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.