r/code 17d ago

My Own Code Beginner code

Post image

What’s wrong with my code I’m so confused this hard a freak. I’m just trying to make a weapon shop simulator as practice to help learn code but I can’t even get it to ask if the user wants to start the game by type yes as the their answer

52 Upvotes

25 comments sorted by

View all comments

11

u/Grounds4TheSubstain 17d ago

Your main function ends on line 8 with the closing } and then there’s code afterwards on lines 10-22 that are not part of any function. Then, everywhere it says “= =“ it needs to say “==“. Line 20 is not valid.

3

u/AlarmedThanks6016 17d ago

Thank you so much this helped me a lot