when i try to make my bannanna shoot a bullet, it says constructor bullet cannot be applied to given types;
required: no arguments found: bannanaofdeath reason: actual and formal argument lists differ in length
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class bannanaofdeath here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class bannanaofdeath extends you
{
/**
* Act - do whatever the bannanaofdeath wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
i am making a gun, aka, bannana of death,shoot a bullet,but i have a compiling problem where it says this
construct in class bullet cannot be applied to given types;
required: no arguments found: bannanaofdeath reason:actual and formal argument lists differ in length
this is my bannanaofdeath.class
*/
public void act()
{
if (Greenfoot.isKeyDown("space")) {
getWorld().addObject(new bullet(this), getX(), getY());
}
}
}