Error with the for loop not working

I’m having trouble with implementing the for loop for the Text101 project. I did it exactly as the video stated and now it won’t respond to me pressing any numbers. It shouldn’t be the code because I went back to the github and directly copied it just to make sure. I did some debugging and found that even if I press the number, ex. 1, and there is only 1 state, it will never set state = nextStates[index]; . I need some help.

Disregard this. I figured it out. I commented out the element that changed the text. I was going to each state, but not changing the canvas text to match the new state’s text.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms