+ 1

What is wrong here?

So I get an error at line 42 and I dont get it https://sololearn.com/compiler-playground/WWEZD9jSsAWZ/?ref=app

10th Jan 2025, 11:06 PM
Pro Gamer 12 Nobody
Pro Gamer 12 Nobody - avatar
17 Antworten
+ 3
Bob_Li I don’t that I agree 100% with that. Yes, if you’re goal is to make an awesome game, then yes, it’s time to move on to other projects. But he can continue learning other things and think how to apply it to his game. For instance, he can learn how to use .filter to see how often the player scores over 5. Or he can make other players and practice classes and instantation. He can add objects to each players to keep track of their colors and maybe how much they bet. He should learn responsiveness to see how it will look on different devices. He can definitely improve the UI. He needs to learn some color theory and flexbox. Check out Colorhunt and google color palletes. He can make a backend to track previous scores with login and authentication. It makes learning so much more interesting when there is a personal place to apply what you have learned rather than just being bland theory.
12th Jan 2025, 6:45 PM
Zvi
Zvi - avatar
+ 2
=> is not the same as >= in line 41 maybe you should write if (deaths >= 100)
11th Jan 2025, 2:56 AM
Bob_Li
Bob_Li - avatar
+ 2
There's a limit on how much features you can add to a game. You can pimp up a game of dice as much as you want, but in the end, it's still basically a game of dice. Maybe it's time to start a more complicated game? you made a game of chance. maybe next make a game of skill or dexterity, a game of memory, a game of strategy, etc...
12th Jan 2025, 1:42 PM
Bob_Li
Bob_Li - avatar
+ 1
Pro Gamer 12 Nobody looks like we are rehashing an old oversight of btn ... This is the code without any style <- https://sololearn.com/compiler-playground/W6XajLB5un0m/?ref=app
11th Jan 2025, 12:48 AM
BroFar
BroFar - avatar
+ 1
This is not the problem because when you get 100 deaths it pops and error at line 42 but it was another problem that I wasn't aware of
11th Jan 2025, 2:10 PM
Pro Gamer 12 Nobody
Pro Gamer 12 Nobody - avatar
+ 1
Also is there something like a function that tells the program to wait?
12th Jan 2025, 10:26 PM
Pro Gamer 12 Nobody
Pro Gamer 12 Nobody - avatar
+ 1
Zvi probably. If it's just for learning, yeah, it could be used to explore various functions. But as a game, i doubt more features will make the game more engaging to players than just better ui design. Pro Gamer 12 Nobody But if it's what you want, yes, providing user statistics as Zvi suggested might be doable. Re-organizing your code so it's more maintainable and extensible is also a good idea You can also consider adding sound effects. Or if you're really serious, set up an external database, player login, scoreboard ranking, the whole shebang... Also, can you elaborate more about the idea of making the program wait? It sounds interesting, but I'm not clear what it's supposed to wait for...
13th Jan 2025, 2:52 AM
Bob_Li
Bob_Li - avatar
+ 1
I checked out the updated game. I think Bob_Li is right , it’s time to move on. Learn more skills and make better projects. Good luck.
13th Jan 2025, 1:44 PM
Zvi
Zvi - avatar
0
I added some achievements but I want some suggestions dor new achievements
12th Jan 2025, 12:08 PM
Pro Gamer 12 Nobody
Pro Gamer 12 Nobody - avatar
0
Zvi I've seen a tutorial for .filter but I didn't really understand it
12th Jan 2025, 9:48 PM
Pro Gamer 12 Nobody
Pro Gamer 12 Nobody - avatar
0
Pro Gamer 12 Nobody do you mean async/ await? I suspect that isn’t what you are looking for. If it is, then it’s called a promise. Good luck with that! As far as .filter goes I learned how to use it with the Mimo app.
12th Jan 2025, 11:17 PM
Zvi
Zvi - avatar
0
Pro Gamer 12 Nobody i realize you are probably looking for setTimeout ()or setInterval()
13th Jan 2025, 1:15 AM
Zvi
Zvi - avatar
0
I made some changes and I want to ask Are the mythic and exotic achievements impossible?
13th Jan 2025, 12:49 PM
Pro Gamer 12 Nobody
Pro Gamer 12 Nobody - avatar
0
if you played for a long long time... maybe it's possible. It's a game of chance. People win lotteries after all. But algorithmic random is not really random, so maybe it's impossible.
13th Jan 2025, 1:37 PM
Bob_Li
Bob_Li - avatar
0
I somehow managed to get a legendary achievement proving that It's not impossible but I still couldn't get a mythic
13th Jan 2025, 9:02 PM
Pro Gamer 12 Nobody
Pro Gamer 12 Nobody - avatar
0
But I don't have any other ideas for a different game
14th Jan 2025, 10:22 PM
Pro Gamer 12 Nobody
Pro Gamer 12 Nobody - avatar