Julien Posted May 20, 2018 Report Posted May 20, 2018 Hello, I've been going through the videos 40 to 44 and writing all the code for the Treasure Hunt Game. I keep getting an error message: TypeError: int() argument must be a string, a bytes-like object or a number, not 'function' random_cave = random.randint(1,2) if random_cave == int(chose_cave): print("---->you found treasure!") else: print("---->you were eaten by a monster") Any ideas? Is this just a version problem? Using 3.6.5 Regards, Julien Quote
administrator Posted May 20, 2018 Report Posted May 20, 2018 Not a version problem. The error is telling you: you are sending a function as the argument when it is expecting a string or number. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.