Python Forum
Error trying to draw a gif with graphics.py
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error trying to draw a gif with graphics.py
#9
(May-29-2018, 05:28 PM)Larz60+ Wrote: you show code as :
while True:
p1.getMouse()
choice=entry1.getText()
if choice=="f":
choices.undraw()
entry1.undraw()
error.undraw()
Fight()
break
else:
error.setTextColor('white')
error.setSize(24)
error.draw(p1)
needs to be indented
while True:
    p1.getMouse()
    choice=entry1.getText()
    if choice=="f":
        choices.undraw()
        entry1.undraw()
        error.undraw()
        Fight()
        break
    else:
        error.setTextColor('white')
        error.setSize(24)
        error.draw(p1)
The code may still be bad, but you need this indentation

on import you only need:
from graphics import*
from pygame import*
But I wouldn't do it this way (for future reference) better to import what you specifically need

Ohhhh..... Yay all my stuff is indented properly I just forgot to do it here so that not the issue. im really confused now, I have done this before and im looking back on it and im doing the same here as i did there and there are no issues. But yet there is issues here for some reason.
Reply


Messages In This Thread
Cant draw a image Help - by fierygaming - May-28-2018, 03:54 PM
RE: Error trying to draw a gif with graphics.py - by fierygaming - May-29-2018, 07:12 PM
RE: Cant draw a image Help - by j.crater - May-28-2018, 05:21 PM
RE: Cant draw a image Help - by fierygaming - May-28-2018, 05:30 PM

Forum Jump:

User Panel Messages

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