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

2016/8/21

needs compiling

loxtn10 loxtn10

2016/8/21

#
the game is not compiling no errors were given too. there are grey slashes on the actors classes almost all and the worlds also have grey slashes, when I check the codes it has no error nor red underlines, I've checked it twice thrice. reopened greenfoot, "ctrl+b - terminated" too. restarted the computer, no more idea to fix, the deadline for the project is getting near, I REALLY need to fix this, you could request me to post the game too, if needed.Dear danpost please help, thanks
Super_Hippo Super_Hippo

2016/8/21

#
Upload the scenario and include the source code. Or you post all the code which is not commented out (=grey slashes) here if it is not too much. By the way, if you comment out everything, then nothing will happen.
loxtn10 loxtn10

2016/8/21

#
I have almost 19+ actors greyed out."" could you wait for me, Couldn't export the file It couldn't compile
loxtn10 loxtn10

2016/8/21

#
I found a red underline
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
private void noteAmmo()
    {
        //TIMER FOR NOT ENOUGH AMMO DISPLAY
        if (offNA)
        {
            NAtime++;
            if (NAtime == 30)
            {
                removeObjects(getObjects(NA.class));
                NAtime = 0;
            }
        }
    }
    private void checkShop()
    {
        if(shopp.show == 1){Greenfoot.setWorld(new srfc());//the red underline is in the "new srfc())"}
    }
srfc is a world class, the code here is for when the shop is about to be opened by setting the shopp.show into 1. the srfc is the shop world.
danpost danpost

2016/8/21

#
loxtn10 wrote...
1
if(shopp.show == 1){Greenfoot.setWorld(new srfc());//the red underline is in the "new srfc())"}
srfc is a world class, the code here is for when the shop is about to be opened by setting the shopp.show into 1. the srfc is the shop world.
Again, the suggestion I gave in the other thread has not been performed:
1
2
3
4
// change this part
new srfc()
// to this
new srfc(getWorld())
loxtn10 loxtn10

2016/8/21

#
this image I already did, but still it doesn't work. :((
danpost danpost

2016/8/21

#
loxtn10 wrote...
this image I already did, but still it doesn't work. :((
Sorry, I should have realized the code was in the Scene world class by the use of 'removeObject' and 'getObjects' without 'getWorld().' before them. See your other discussion thread.
You need to login to post a reply.