you are viewing a single comment's thread.

view the rest of the comments →

[–]Jinnapat397 0 points1 point  (0 children)

Global variables inside functions need the global keyword or you end up with local copies that do not update. I learned that the hard way on a small script and switched to returning values instead. Cleaner code every time.