Animations don’t work

None of the animations made for the Processing program are working.

I was given a correct code to animate a small rectangle gliding across the screen. When I wrote out the code, copying it, I was told that there was a ; a () or a {} missing somewhere. I did everything I could think of to fix it.

I’ve copy pasted diffrent animations to the program in order to see if it was a “me” problem. I was given the same message.

I went back to copying the code given to me by hand, I’ve added and subtracted ; and () and even {} but nothing seems to work. I have no idea what to do, and it was an assignment from a professor.

If anyone can help, that’d be great!

Welcome to the forum.

There are lots of people here that can help but you need to ask the right questions. Unfortunately your question is extremely vague. I suggest that you read the guideline to asking questions and you should mark it as homework.

2 Likes

There may very well be errors in the original code that need correction and part of the homework question.

I suggest you take a look at working examples here:

Which version of Processing and editor are you using?

The Processing 4.3 editor will show errors (click on the red lines for details):

The example above is missing a ; and a closing }

If you move mouse over an opening bracket it will highlight the closing bracket.

If you click on File > Examples… you will find many working examples:

Do these examples work for you?

Keep at it!

Scrutinize the code one line (statement, block, function, etc.) at a time and refer to references for the code.

The experience of going through this will benefit you in the future!

:)

3 Likes

please post your code here

(sounds like you forgot one } at the end. The pairs of {...} must match)

1 Like