bewillderbeast
@Mozyyoo
sleeps for losers
So i started a fresh repl, all i did was import pygame, initiate it and already, when ran, i receive this line of error messages:
ALSA lib confmisc.c
SixBeeps They're just warnings that show up when it can't find a sound card to play audio from. This makes sense because Pygame Repls can't play sound, but it's safe to ignore them as you have been doing.2 years ago
(Sorry about making another one of these problems, i just have no idea why my program is doing this now)
So i have a text-based game and it was doing
Python
19wintersp This issue keeps happening to people. In Python, this:
myvar = 0
if myvar == 1 or 2:
print("myvar is 1 or 2")
would print "myvar is 1 or 2". This is because of how the condition is interpreted; not like this:
if (myvar == (1 or 2))
but like this:
if ((myvar == 1) or (2))
In Python, 2 is truthy, and so the if block runs. You should either check whether the variable is in a list of options:
if myvar in [1, 2]:
print("myvar is 1 or 2")
or check each option individually:
if myvar == 1 2 years ago
So i'm working on a very simple game and i'm attempting to add images. (I'm working on Pycharm to see if it makes any difference.) I try to run the co
Python
19wintersp You wrote "Moving MC" and "Moving MC(2)", did you mean "Moving MC.png" and "Moving MC (2).png"?2 years ago