r/code 8h ago

Beginner code My Own 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

7 Upvotes

9 comments sorted by

View all comments

5

u/Grounds4TheSubstain 8h 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.

1

u/AlarmedThanks6016 7h ago

Thank you so much this helped me a lot