Python Forum
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code not working
#3
It seems to me that RaceGen() needs a 'self' parameter
def RaceGen(self):
    items = '''
        Dwarf DragonBorn Elf Gnome Half-Elf
        Half-Orc Halfling Human Tiefling
    '''.strip().split()
    self.CharacterRace.addItem(random.choice(items))
@Alfalfa oh yes, perhaps 'event' too!
Reply


Messages In This Thread
Code not working - by Luzaich - Sep-03-2018, 03:57 PM
RE: Code not working - by Alfalfa - Sep-03-2018, 04:31 PM
RE: Code not working - by Gribouillis - Sep-03-2018, 04:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Tk .set not working in parts of code User01 2 1,895 Feb-13-2021, 03:39 PM
Last Post: deanhystad
  [Tkinter] my simple window code is not working antonmichel 8 13,134 Jan-29-2018, 06:24 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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