Ask coding questions

← Back to all posts
Try and break it
Asteroidboy308 (0)

Can you guys please try and find any bugs or problems in this code. This is my tenth version of it and it has highly improved. Please comment on how I could do better, problems with the code, or things to add.

Answered by Coder100 (17045) [earned 5 cycles]
View Answer
Comments
hotnewtop
Coder100 (17045)

1. imports should be top level

make sure these imports are TOP LEVEL (outside of any function, no indents, etc.)

2. these should also be global

put these outside of functions

3. put these on the top of the file

make them easy to find!

Asteroidboy308 (0)

@Coder100
Yes can people edit this and will it affect me?

Coder100 (17045)

nope
only you can lol
otherwise people will have to fork to edit it @Asteroidboy308

Coder100 (17045)

cool
mark as correct answer? @Asteroidboy308

Asteroidboy308 (0)

@Asteroidboy308
I don't think I want to do number two though because I want those only set to those variables when I type reset to reset all data.

Coder100 (17045)

@Asteroidboy308 oh yeah, that's fine.
Usually variables like that are global