20 hours ago, Lactose said:In one of Josh's earlier posts he said where the timeStampPrevious variable should be stored. It needs to be a member variable of a class (which also contains the drawScene function), or it needs to be a global variable or something similar. It should also be initialized once, not every time the function is run. Globals are not the best suggestion (they rarely are), but it might be easier to start with a global and make things work.
Similarly for the timeUntilSecondSprite variable. It is currently created, initialized every time the function is called, and is destroyed once the function exits.
If you want to have info persist across multiple calls to the same function, you can't use just local variables like you are currently doing.
In general, there's a lot of strange stuff in your code. Read through your code line by line and try to understand what each line is supposed to do.
Additionally, all the "upper_row_xxx" functions also screams that you should look into loops as well, but that's a problem for another time...
in your second paragraph you said "and is destroyed once the function exits"