Python Forum
When I tried to make an index for a walking animation and it didnt worked
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
When I tried to make an index for a walking animation and it didnt worked
#2
This code works:

import pygame

for num in range (1, 5) :
	image_right = pygame.image.load (f'handsomewalk1{num}.png')
So... You may be in the wrong folder or you may have spelled something wrong in either the program or the directory. There is a number one in the filename that looks like it might be a type-o.
Reply


Messages In This Thread
RE: When I tried to make an index for a walking animation and it didnt worked - by BashBedlam - Jul-26-2021, 08:23 PM

Forum Jump:

User Panel Messages

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