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

2018/12/28

no suitable method found for move HELP!!!

shane11300 shane11300

2018/12/28

#
Tried making a game earlier and everything was going fine until when I was almost finished the game did not run because a message keeps on saying "no suitable method found for move", please help me I really need this game for my work:) Below is the code and the word "move" keeps on having the message pop up "no suitable method found for move". please help me:) public class Bullets extends Mover { private int life = (Greenfoot.getRandomNumber(50) + 100); /** * Act - do whatever the Bullets wants to do. This method is called whenever * the 'Act' or 'Run' button gets pressed in the environment. */ public void act() { splatter(); getThanos(); move(20,0); life--; if (life == 0) { getWorld().addObject(new Splat(), getX(), getY()); getWorld().removeObject(this); } } public void getThanos() { if (isTouching(Thanos.class)) { removeTouching(Thanos.class); getWorld().addObject(new Thanos(), Greenfoot.getRandomNumber(getWorld().getWidth()/2), Greenfoot.getRandomNumber(getWorld().getHeight())); } } public void splatter() { if(isTouching(Thanos.class)) { Splat splat = new Splat(); getWorld().addObject(splat, getX(), getY()); } } }
danpost danpost

2018/12/28

#
shane11300 wrote...
Tried making a game earlier and everything was going fine until when I was almost finished the game did not run because a message keeps on saying "no suitable method found for move", please help me I really need this game for my work:) Below is the code and the word "move" keeps on having the message pop up "no suitable method found for move". please help me:) << Code Omitted >>
Please show your Mover class code, as well -- and use code tags (square brackets with the word "code" before the code and same with "/code" after).
You need to login to post a reply.