Timer
Timer that tracks time in seconds, minutes, hours, days, and weeks.
why are there globals?
@TaylorLiang I don't quite remember, but I think 'variables were referenced before assignment', so I made every variable global. Twice.
@Knecinedit why though? Global variables are a bad practice
@TaylorLiang Why are globals bad?
@TobyS They lead to errors and bugs, that are often difficult to debug or fix
@TaylorLiang Well I guess if your entire code was dependent on 1 global yeah but a few globals in short code shouldn't be a problem
@TobyS reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
@TaylorLiang Haha thats what I was expecting
@TobyS reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
@TaylorLiang Exactly
@TobyS screeching
@TaylorLiang What do you suggest as an alternative? If a variable is necessary in multiple functions, it can't just sit there and remain local. That'll cause an error itself.
@Knecinedit make it a perameter in the function
so main(time, x1,x2,x3, *etc)
@TaylorLiang if you have lots of parameters, that can serve the same purpose within the function, it would make more sense to list it as an *args. Just a tip. Don't know if it applies here though.
@TaylorLiang There we go, I have removed the globals. I never had any bugs or errors with them, but I appreciate anything clean up my code. Thank you!
couldn't you just do
@Warhawk947 ...yes. Yeah.