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

2018/12/19

problem with "imageHeight has private acces in greenfoot.Actor"

Andrees6 Andrees6

2018/12/19

#
Hi guys, so i have two platforms and the first one works fine but i have a problem with my second platform (its called "platforme") and i get this error : "image Height has private acces in greenfoot.Actor" this is my code :
public boolean didBumpedHead2() {
        boolean bumpedHead2 = false;
        int imageWidth = getImage().getWidth();
        int imageheight = getImage().getHeight();
        if(getOneObjectAtOffset(imageWidth / -2, imageHeight / -2, platforme.class) != null || 
           getOneObjectAtOffset(imageWidth / 2, imageHeight / -2, platforme.class) != null)
           bumpedHead2 = true;
           return bumpedHead2;
danpost danpost

2018/12/19

#
Andrees6 wrote...
Hi guys, so i have two platforms and the first one works fine but i have a problem with my second platform (its called "platforme") and i get this error : "image Height has private acces in greenfoot.Actor" << Code Omitted
Your variable name is imageheight -- not imageHeight.
Andrees6 Andrees6

2018/12/20

#
Thank you, it works :>
You need to login to post a reply.