I want to know why this question that has a user's upvoted answer and my upvoted & accepted answer on it got deleted. Screenshot of the deleted post:
For one, the close reason is that it was caused by a typo, but I don't see that as the case;
they thought that the update
function gets called outside the loop, when it should be called inside the loop. There was no indentation error, the program simply acted differently from the intended behavior.
Besides pointing out the issue, I've also included more helpful information explaining some key points to the OP. I would've simply voted to undelete, but because a mod deleted it, I couldn't.
update
function didn't belong in the loop, not how they neglected to indent that line.