#๐Ÿ”’ pygame code just makes a blank black screen

35 messages ยท Page 1 of 1 (latest)

brazen rockBOT
#

@manic slate

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

manic slate
#

im trying to paste my code and it gets delete

split tiger
#

!code

brazen rockBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

manic slate
#

itds making it a file

split tiger
#

If it's too long, you need

#

!paste

brazen rockBOT
#
Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

split tiger
#

Or post it on Github.

manic slate
#

i just get a blank black screen after i go past my load screen

#

i cant figure out whats wrong with my code

split tiger
#

I'll admit, I don't know Pygame. I was just commenting to let you know how to post the code.

manic slate
#

๐Ÿ‘ ty

#

i asked chat gpt what was wrong with the code, and it gave me a revision and now the screen is red instead of black

icy knoll
manic slate
#

all the code you have in the ss or more?

icy knoll
#

everything in the screenshot

manic slate
#

it says unexpected indent when i run the code

manic slate
icy knoll
#

by one indent

#

so like, 4 spaces/1 tab (key or character)

manic slate
#

i tried one tab on all of them and it said unexpected indent

icy knoll
manic slate
#

oh

#

what is the cuase of the error

icy knoll
manic slate
#

cause

#

oh ty

#

all that did was add a black rectangle to the side of the screen alogn with the red XD

#

btw the code is written by chatgpt so i understand very little of it

icy knoll
#

I'd highly recommending familiarising yourself more with Python itself before tackling on pygame(-ce), you can check this out for resources

#

!res

brazen rockBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

brazen rockBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.