Why does it keep printing 'None'?
go to the bathroom using '1'. it should be printing a random weapon(line 181) but instead it prints 'None'. i just can't figure out the problem
The issue is that you never actually return a weapon so it can be fixed by doing the following:
def gen_wep(wep): n = randint(1,100) if n < 6: wep = ['Rocket launcher'] weapons.append(wep) if n > 5 < 30: wep = random.choice(['Shotgun','Machine Gun']) weapons.append(wep) if n > 29: wep = random.choice(['AK-47','Pistol']) weapons.append(wep) return wep
It should work