This site requires JavaScript, please enable it in your browser!
Greenfoot back
acredb
acredb wrote ...

2023/3/21

can anyone explain how to code ai in a way that my pea brain will understand?

acredb acredb

2023/3/21

#
basically i'm really stupid and can barely understand the syntax errors that i'm getting. - this is the code, move(5); if (Greenfoot.start() = true) { turnTowards(AverageSpaceLoaf.getX(), AverageSpaceLoaf.getY()); } and if i try to fix one syntax error, another pops up, and so on no clue how to fix it, been on someone else's thread and i could barely read what was on the screen, everything kinda blurs together
danpost danpost

2023/3/22

#
acredb wrote...
basically i'm really stupid and can barely understand the syntax errors that i'm getting. << Code Omitted >> and if i try to fix one syntax error, another pops up, and so on no clue how to fix it, been on someone else's thread and i could barely read what was on the screen, everything kinda blurs together
The Greenfoot.start() method has a void return type. You cannot reference a void or compare it with anything. Also, the equal comparison operator is a double equal sign ( == ), not a single one ( = ).
You need to login to post a reply.